« first day (2042 days earlier)      last day (2897 days later) » 

9:01 AM
@Sippy mm.. yeah.. :/
I always get the client to sign-off on specs before we start implementing the feature.
 
Hi guys
i have 1 web service which is consumed at same time from two different location
what can be the behaviour of that web service?
will that service would be able to serve that two request at same time?
 
If your web service is designed for that... and they really should be... yes.
 
kappa.
 
will there any performance issue like delay for getting data for 1 location
its a web api service
call from 2 location at same time
 
Just the regular latency/networking/hitting the database time.
Which fluctuates...
 
9:12 AM
so should go go on creating different service?
or shoulg i go with using same service?
 
...
Honestly these questions are dumb again @Learning
If you need the same data, use the same service. Why the fuck would you create another service?
 
@Learning Is there a separate instance of StackOverflow for each user that accesses it? A different service?
 
@RoelvanUden:Sorry
@AvnerShahar-Kashtan yeah exactly right
 
@RoelvanUden in his defense, these questions are not as dumb as they used to be.
 
Client server architecture, in the abstract, has a 1:N relationship between server and clients. One server for multiple clients.
 
9:15 AM
Plus what he lacks in knowledge he makes up for in persistence.
 
@Squiggle:yes very right
Thank you for understanding
 
I have one quick quick question I have a dll that connects to the DB and does lookUp, I've made the field private and the constructor public.. but I need to get that connectionString from another DLL so if I put the field public I wont have any issue right?
 
I have data like this:
Id  Name  Country
1    Abc  London
2    Xyz  London
3    lll  London
4    jjj  Usa
5    hhh  Usa
6    kkk  Usa
 
good morning
 
9:18 AM
and for london users my service will return only london users and not usa users
and for Usa my service will return only usa users and not london users
 
does anybody know how to pass the values of my linq list to my data table?
code:
LQDataSetDataContext db = new LQDataSetDataContext();

var lstTerm = db.sp_Terminal("").ToList();
if (lstTerm != null || lstTerm.Count() > 0)
{

}
already tried this BDfuncionarios = lstTerm.CopyToDataTable();
no sucess
anyone?
 
@AndréMarques ctrl + k on the text
 
@Squiggle He's learning in, what, 2015-2016? This isn't the 60's
 
*on the code
 
@RoelvanUden patiennnncceeee
 
9:23 AM
@Squiggle Don't you curse at me
 
@AndréMarques edit message -> select code -> ctrl + k
 
@Learning Using a single server, users (clients) will have to identify themselves as being in a particular location.
@Learning unless you actually do want to expose entirely different sites for different locations. Which is kinda weird.
 
@Mr.Toxy too old to be edited
 
i have 1 exe through which users will be registered and saved in table shown below:
Id  Name  Country
1    Abc  London
2    Xyz  London
3    lll  London
4    jjj  Usa
5    hhh  Usa
6    kkk  Usa
 
9:24 AM
@AndréMarques you can only edit within a minute or so
 
users will be registered from different location
 
@Learning In the normal form country would be a different table.
 
@Learning break it down into different layers. Work out the architecture in your head. If you have a geniuine question, please ask.
BCNF4LYFE
 
@Squiggle You what now
 
i want to design my service in such a way that it should return location wise data
that is if anybody is calling my service from london then my service will return only london data
i have think my table like this:
Id,Name,Device,Country
Users are registered through device and so i will store device Pid
For eg:device use in london to register will have Pid:1
Usa:2
something like that
 
9:28 AM
@RoelvanUden Boyce-Codd normal form, m8.
 
but here i am confuse that how my service will return location wise data
 
@Learning query parameters, perhaps? Get the client to identify where they are, and filter accordingly.
Big question: How do you know where the clients are?
 
Please don't say IP, please don't say IP
 
db normalization ftw
 
XD
 
9:30 AM
IP
IIIIIIIIIIPPPPPPPPPPPPPPPPPP
 
@Squiggle:That is where the confusion is
 
plz does anybody know how to pass the values of my linq list to my data table?
code:
LQDataSetDataContext db = new LQDataSetDataContext();

var lstTerm = db.sp_Terminal("").ToList();
if (lstTerm != null || lstTerm.Count() > 0)
{

}
 
anybody can call me wweb service from anywhere
clients can be from anywhere
 
var lstTerm = db.sp_Terminal("").ToList(); why is the terminal like this ""?
@AndréMarques
 
@Mr.Toxy forgot to fill the value
 
9:32 AM
if (lstTerm != null || lstTerm.Count() > 0)
{

}
this doesnt make sense
just check if the list is empty or not
 
@Mr.Toxy isnt it checking?
 
if(lstTerm.Count > 0)
{

}
just that
 
@Mr.Toxy ok and how do it put my list data to a datatable
 
it was easy to search
 
@Mr.Toxy already tried didnt get it to work
IEnumerable<SomeType> data = ...
DataTable table = new DataTable();
using(var reader = ObjectReader.Create(data)) {
    table.Load(reader);
}
@Mr.Toxy tried this but didnt knew what to put in SomeType and in ...
 
9:36 AM
some type?
ha ok
someType its the type that you want the lis tto be
string
int
etc...
 
@Mr.Toxy but from db i get string and ints
@Mr.Toxy and other things
 
@AndréMarques use string
 
@Mr.Toxy but i tried to put string didnt work
 
if you need Convert.ToInt32
 public DataTable ConvertToDataTable<T>(IList<T> data)
    {
        PropertyDescriptorCollection properties =
           TypeDescriptor.GetProperties(typeof(T));
        DataTable table = new DataTable();
        foreach (PropertyDescriptor prop in properties)
            table.Columns.Add(prop.Name, Nullable.GetUnderlyingType(prop.PropertyType) ?? prop.PropertyType);
        foreach (T item in data)
        {
            DataRow row = table.NewRow();
            foreach (PropertyDescriptor prop in properties)
https://gist.github.com/MrToxy/e349be74c66cbc228f9e7e7dbd9c72a1
i have this class where I pass a connection string so it connects to the DB and I need to access the Connection field from the other DLLS as well, is there any wyas that I only need to pass the connection string once? Because like this everytime I instanciate the class I need to pass the connection string
 
neh
change the ctor to take an OracleConnection
 
9:47 AM
hi...i have one query regarding Ninject..is it possible to bind two classes with one interface??..anyone have any idea??
 
let the caller manage the actual connection
 
instead of passing the connection I pass an OracleConnetion?
 
instead of passing the connection string
pass the connection
 
but whats the difference since Im doing this this.ORAConnection = new OracleConnection(ConnectionString);
'?
 
because now the caller has no control over opening and closing connections and transactions and all that good jazz
you could add a bunch of OpenConnection/CloseConnection helpers
or you could just let them pass a connection object and assume they know what they are doing
 
9:51 AM
public CdpsiUpdateSql(OracleConnection ORaConnection)
        {
            this.ORAConnection = ORaConnection
        }
like that?
and when I call the constructor
 
I do like
OracleConnectio(sfsfsdfsdsdf)
@StevenLiekens I will always have to pass the OracleConnectio anyways.
 
10:05 AM
WebAPI folks - do you format your returned JSON as camelCase? or do you retain your C# style PropertyNamingConvetions?
 
lowerCamelCase always.
 
you ready both well
I prefer C# style, got used to it
the difference is that camelCase will always start with lower case
 
C# consumers can easily convert lowerCamelCase back to the properties they map on, there is no real issue there. Consuming a WebAPI from JS is unnatural when the properties are CamelCase; this is why I use lowerCamelCase. Because it's natural to deal with in every situation I deal with.
 
oh I see
 
I agree with @Roel. For C# clients, you probably won't be dealing with the JSON directly, but in javascript you probably will, because JSON maps 1:1 into JS objects. Well, technically JSON objects are JS objects.
Also, C#'s convention is called PascalCasing, just for the record.
 
10:15 AM
fanct
*fancy
I use a lot of PascalCasing
and... the resharper bs hints for the names
I need some help with the "architecture" should I say, of my classes
 
The architecture, or the "architecture"?
 
the 2nd one
so I have this class that handles connection to the dataBase
https://gist.github.com/MrToxy/58d44fe92246f7595c61c6ca27a81e33
and I have this one that Exectues the commands that I get from another DLL
https://gist.github.com/MrToxy/420ae14b03bb4b1adbdbaa7b46d51618
how can I make that the second DLL doesnt need to pass nothing to the constructor of the 1st dll and just grab the connection field from the first one?
 
Nope, still not clear what you're asking.
 
hmm I will try to explain better
so the first dll has a constructor that requires an OracleConnection as a paramater
 
@Sippy lol, yeah, I know what Ramadan is. It just seemed a bizarre way to talk about over consumption.
 
10:24 AM
on the second DLL I need to get that OracleConnectio in order to execute the commands
but the way I build the first DLL I will always need to pass an OracleConnection when I instanciate it
on the second DLL how can I just grab the OracleConnection from the first one wihout needing to pass the OracleConnection again when I instanciate the class?
 
Is it a bad idea to catch(Exception) if I want to display an error message on a website?
 
if you dont want your program to just crash and you need to know what was the error I would say no?
 
I'll forward the exception to the error view
 
@JanDvorak Generally, yes - don't want that in production. A better way will be to implement a library like Log4Net in your site and log the error message to text file/database/ wherever, and rather redirect your user to an error view
 
@AvnerShahar-Kashtan better?
 
10:33 AM
So.. did anyone try functional programming techniques in c# yet? would love to hear opinions on it. seems to make testing much easier, but forcing immutability in objects ...seems costly
 
Luckily in the current phase we plan to only be able to see those messages ourselves; then do some basic dispatch on exception type to show one of custom messages
 
@JanDvorak Then it shouldn't hurt placing the exception in the view. just remember to take it out. Also, Tip, Seems like you're trying to catch em' all - you a pokèmon master or something :P My boss always preaches to me to target specific exceptions if I absolutely must do exception handling, so that any unknown exception that doesn't get caught officially gets classified as a bug - since it's an "EXCEPTIONAL" case
 
I'm aware of the "who should see what" thing and we seem to have a homebrew logger in our project already. I was more worried about things like "if you catch them all, you will no longer be able to shut down your program".
 
on the second DLL should I just make a constructor that gets an OracleConnection again?
 
10:53 AM
@Krohn Costly in what? RAM?
 
@Krohn if you've ever used LINQ then you've done functional programming in c#
 
@StevenLiekens @Krohn Also, if you've ever used string methods, you've used immutable objects. Yes, it means you have to spend a second being aware of allocations whenever you mutate an object's state, but that's not too bad.
 
private OracleConnection Connection { get; set; }

    public CpdisUpdateScripts(OracleConnection connection)
    {
        this.Connection = connection;
    }
    private static CdpsiUpdateSql Updater = new CdpsiUpdateSql(Connection);

this says: "Cannot access non-static property "Connection" in static context" on the last line
why?
whats wrong?
 
@Mr.Toxy Connection is an instance member of the class. But the Updater property is static, it exists regardless of instances of the class.
 
@Mr.Toxy you need more coffee
 
10:59 AM
I havent had yeat :\
 
there's your problem
 
good morning, now i got donuts powa!
 
  private static OracleConnection Connection { get; set; }

public CpdisUpdateScripts(OracleConnection connection)
{
    this.Connection = connection;
}
 CdpsiUpdateSql Updater = new CdpsiUpdateSql(Connection);
I cant do that also
I'll just leave the OracleConnection public
but this would be better
done
resolved
just had to take out the .this
 
@Mr.Toxy That didn't make much sense. Use the !!/help command to learn more.
 
@Squiggle camelCase. No doubt.
 
11:04 AM
!!facedesk
 
ouch
 
I read that as helpdesk, and it didnt seem odd.
 
!!helpdesk
 
@Mr.Toxy Information on interacting with me can be found at this page
 
11:07 AM
tony I have oracle class that has all the bits
how do I post it somewhere?
 
tony?
 
@Ggalla1779 pastebin/github/hastebin
 
sorry, ironman doesn't write his suite program by c# i assume
 
!!learn
 
11:08 AM
@Mr.Toxy Could not process input. Error: command.name is undefined on line 4953
 
!!listcommands
 
and can you play around with cap on sandbox please?
 
@Mr.Toxy help, afk, ban, convert, define, die, doge, eval, forget, google, hang, imdb, info, jquery, learn, listcommands, listen, live, mdn, meme, moustache, msdn, mustache, nudge, refresh, spec, stat, stats, summon, tell, unban, undo, unonebox, unsummon, urban, weather, welcome, wiki, xkcd, youtube, zalgo, !, !!, $.baby, (4337654<<1)+1, (y), /somecommand, 2020/07/23, 3, 666, :p, </pissing>, ?, ^, ^5, abesnacking, abhi, abhishekpornfreak, acronym, adhd, ah, ahah, algosmarts, aliens, am
angryticks, answer_to_everything, apocalypse, appreciated, archerneat, artisticpoop, artisticsilo, asd, as
 
jesus
 
@tweray He probably use Rust.
 
11:09 AM
!!israel
 
in JavaScript, Apr 28 '15 at 16:09, by rlemon
now when I think "Israel" I can't help but think of a young lady wearing a horse mask accompanied by an unshaven skinny young man walking into a pub.
 

Sandbox

Where you can play with regular chat features (except flagging...
 
@CapricaSix ...
@CapricaSix ...no, I've decided I don't want any context.
 
wow
I've found the best command ever
!!who_is_the_man?
 
@Mr.Toxy You are the man
 
11:12 AM
damn right I am
this is some good motivational shit
 
wow thats a lot of text
 
in wpf how do i lock a panel width and height so he cant resize?
!!Pi
 
pie*
 
!!rekt
 
oh jesus I scared myself
damn
I had somehow changed this chatroom to the sandbox without noticing it, and I was just spamming commands
and then I saw the other tab saying "sandbox" as well
and I thought "Oh Shit Im fucked, im spamming commands in the chat"
 
12:12 PM
It did seem to kill the chat, though.
 
curiosity killed the chat
that pun is even better if you know french
 
we started to fear spam. And the chat become dead.
 
!!wiki spam (food)
 
Spam (stylized SPAM) is a brand of canned precooked meat products made by Hormel Foods Corporation. It was first introduced in 1937 and gained popularity worldwide after its use during World War II. By 2003, Spam was sold in 41 countries on six continents and trademarked in over 100 countries. In 2007, the seven billionth can of Spam was sold. According to its label, Spam's basic ingredients are pork shoulder meat, with ham meat added, salt, water, modified potato starch as a binder, sugar, and sodium nitrite as a preservative. Natural gelatin forms during cooking in its tins on the production...
 
Better.
1 message moved to Trash can
 
12:19 PM
I went to the official Spam museum, many years ago.
There was a diner outside that served all sorts of spamburgers and such.
Was nice.
There was a room in the museum with nothing except a TV playing Monty Python's spam sketch over and over again.
Spamming it, as it were.
 
Bmo
@KendallFrey Goes to google translate. "Heh."
 
12:50 PM
christ
coconut water is not my bag
god that's awful
like drinking saline solution mixed with milk
 
why would you think coconut water WAS your bag in the first place?
 
anyone have suggestions for a free, simple, good uml diagram creation tool?
I have used DIA in the past, and I cant stand it
 
@Michael UML diagrams suck, and are a waste of time...so no
 
yEd. Also, ^
 
sigh.. not my choice
 
12:53 PM
Why do you need a UML diagram in the first place?
 
He did just explain that it isn't his choice :P
Managers b managers yo
 
Luckily I don't have a manager :-D
 
Yes, I was asked to create a Class Diagram. yipeee...
 
Are you complaining that you have to make documentation?
lol
 
UML diagram != documentation...UML diagram is what managers do when they have no clue WTF they're doing
 
12:56 PM
@NicolásCarlo I dunno man
Was a meal deal at the store for lunch
It was the most expensive drink
 
@Michael Just wing it in OpenOffice draw
 
More than half the price of the entire deal
Lol
 
@Sippy Lol, call them up and threaten to sue, they'll probably get one to you right away
 
@NicolásCarlo I mean technically managers don't need to be programmers
 
I don't want one
vile drink
threw it away lol
 
12:57 PM
lol oh
@Failsafe that right there is the problem
 
Eh
I think you guys all work with bad people
 
why the fuck is my chat not autoscrolling
 
@Failsafe i think i personally work with the dumbest people on the planet, all of them met up at some DumbCon and created this company and started working in different positions...then hired me as a contractor to do software work for them...Divine plan to punish me for porn consumption
2
 
> DumbCon
lol
 
roflmao
 

« first day (2042 days earlier)      last day (2897 days later) »