« first day (1286 days earlier)      last day (3652 days later) » 

2:46 AM
hello world
 
 
2 hours later…
4:21 AM
Good morning to all
 
4:45 AM
Hi,Good Morning all
 
5:08 AM
hi all
 
5:53 AM
no one around? :P
 
 
2 hours later…
7:30 AM
hey what's up ?
 
Not many people awake here yet, so probably not much :)
 
:)
 
Not awake, or at work :P
 
7:57 AM
@RoelvanUden I'm both, unfortunately :P
 
HELP: Properties.Resources.Metrics.ToString() <-- ok that works
added a new file to the Resources folder. but its not showing up as an option in Properties.Resources. what am I forgeting
 
Did you add it to the resources?
Files you add to the resource file is copied to the Resources folder, but you can't add new stuff to the resources simply by copying it to the Resources folder.
 
resources.resx ?
 
Double click "Properties" in the solution explorer and go to the Resources tab.
 
crap I thought I checked there. there under files.
<3 thank you
 
8:30 AM
Hi! Q: I like the ?? operator. But, is there any similar way to this example (assuming myObject contains an integer num):
myObject a = null;
int b = a.num ?? 0;
 
an int cant be null, unless its an int? instead of int.
 
I mean that code obviously won't work, but to get the same functionality..
yes but it's the object that I want to check
so if a == null then return 0
 
a.num == null ? 0 : 1234
 
@Markus You could write an extension method then call int b = a.ValueOrDefault(x => x.Num)
 
would that be a static extension then? (maybe all extensions are)
 
8:33 AM
@Markus Read up on extension methods :)
 
but I made it clear that a is null right?
 
int b = a == null ? 0 : a.num
 
@Markus Yeah that's not a problem, may look a bit weird, but completely fine to call an extenion method on a null value
 
ok
 
hello can you help me.?
hello developers
 
8:35 AM
@Jatin I'm on a horse!
 
good
any one?
 
maybe if you specified your question then someone could help...
 
Developers aren't psychics, nor all knowledgeable. Perhaps you want to specify what topic you need help on to have any meaningful answer.
 
okay
okay i will tell you
i have a kendo ui treeview and also drag and drop true..
but problem is allow to parent node drag inside another parent node but i want to dont allow to this happen.
see my question on stack overflow.
1
A: Don't allow parent tree inside a another parent tree to be dragged - kendo drag and drop treeview

Atanas KorchevYou need to handle the dragstart event of the treeview and call e.preventDefault(). Here is how to prevent dragging of root nodes: $("#treeview").kendoTreeView({ dragAndDrop: true, dataSource: [ { text: "foo", items: [ { text: "bar" } ] } ], dragstart: function(e) { if ...

and one member answer for this question and i applied but now parent node drag n drop does not allow.. allow only child.
I don't want to allow this to happen. How can I prevent it?
and see this demo try to practical
demos.telerik.com/kendo-ui/…
So parent will not become the child of other parent
 
Try the JavaScript room. This isn't a C# question at all.
 
8:39 AM
but try to help
you are only dedicated to c#?
 
Kendo is a MVVM/MVC UI front-end toolkit that is usually coupled with an API back-end. The JavaScript boys are a whooping lot better in answering questions regarding an almost entirely 100% JS stack. The back-end being C# is meaningless in the context of your question..
 
okay thanks
 
Hi. Is this correct way to get download speed?
private static readonly string[] DownloadSpeeds = { "Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };

private static string DL_Speed(Int64 value)
{
int mag = (int)Math.Log(value, 1024);
decimal adjustedSize = (decimal)value / (1L << (mag * 10));

return string.Format("{0:n1} {1}/s", adjustedSize, DownloadSpeeds[mag]);
}

button1.Click += (s, e) =>
{
WebClient1.DownloadProgressChanged += (s, e) =>
{
Int64 m = (Int64)((e.BytesReceived / 1024d / sw.Elapsed.TotalSeconds) * 1024);
this.Text = DL_Speed(m);
 
@Markus still wondering about that null thing?
@jyrka What's a Kelvin Byte? #SIFail
 
?
 
8:49 AM
K = Kelvin, k = kilo
 
if you mean the one in "DownloadSpeeds" , it's KiloBytes
 
@jyrka I'm being pedantic.
However class Pedantic : Right :P
 
@dav_i I hoped that there was a similarly operator as ?? (or way to use it) that handled the object, and not the variable
 
@Markus I made that extension method if you want it
 
is it short?
 
8:54 AM
@Markus hmm... define short
actually I can't think of any way that it isn't
	public static TValue ValueOrDefault<TObject, TValue>(this TObject ob, Func<TObject, TValue> func)
		where TObject : class
	{
		return ob == null ? default(TValue) : func(ob);
	}
but promise me you'll understand how all of it works before you use it!
 
absolutely
 
 
2 hours later…
user1804599
11:01 AM
@dav_i Usage might be confusing.
 
user1804599
If you see x.f() you expect that x cannot be null.
 
user1804599
(Screw universal nullability.)
 
11:25 AM
@rightfold Eh, you can always just use it as a static class if you prefer
 
12:01 PM
good morning!
 
12:12 PM
Hello, Kendall Frey
I have one c# question:
I created C# software Project in Visual Studio 2010 and my database is Sql Server 2008 Express Edition.
I created my project's setup using visual studio 2010.

Actually this software is created for my client.
In this software some data is inserted and deleted and updated and displaying data in grid view and generate bill using crystal report this type of functionality is in my software.

Now when my software i installed in my client pc then client pc also requires sql server 2008 express edition and when i attach my database then software runs properly.
 
Include SQL in your installer, or, use a flat-file DB like sqlite or compact?
 
Thanks.
How to include sql in installer
 
@user3216114 Step 1: Open Google
 
Hey! Have anybody used xamarin for ios app development?
 
ok I opened Google website.
@KendallFrey ok I opened Google website.
 
12:22 PM
now search
 
Thanks.
 
funny
 
12:42 PM
@MohiniMhetre I have.
 
no9
hello
 
Hello Lasse V. Karlsen How are you ?
 
no9
@KendallFrey giving google lessons again ... you are no help at all dude :P
 
Actually I am. I'm teaching a valuable skill.
 
@no9 It's a lot faster and less annoying in comparison to asking basic shit
If you can't Google/Bing/Whatever, you'll be bound to be a poor dev. Kendall is teaching life lessons there.
 
12:54 PM
Also, it will be quicker just to read a tutorial then to have me retype one out into chat
 
Required must-have skills for a developer:
#1: Searching for similar problems
#2: Comprehensive reading
2
 
I understood.
 
lmgtfy.com/‎ is always good in these instances
 
user1804599
 
no9
oh my ... i just made a joke, no need to reinvent a wheel
:]
 
1:31 PM
Is this correct way of knowing the time remaining? public static Int64 CalcDownloadTime(Int64 time_taken, Int64 bytes_recieved, Int64 bytes_to_recieve)
{
Int64 i = ((time_taken / bytes_recieved) * (bytes_to_recieve - bytes_recieved));
return i;
}
 
Well, couple of things:
Don't use `Int64`, you'll get integer division, probably not what you want
Don't call this before you've actually received something, because then `bytes_received` will be 0 and you'll get a division-by-zero exception.
Did markdown formatting just break here?
 
i think it doesnt work here?
 
Markdown formatting works, though it's a limited subset. But things like backtick for code, etc. should work. code
 
test
 
Good day all
 
1:39 PM
wekk what do i use instead of Int64 ?
well *
 
How do you measure "time taken"?
 
sw.ElapsedMilliseconds, e.BytesReceived, e.TotalBytesToReceive are "long" as in "Int64"
 
user1804599
@jyrka double
 
user1804599
Or a proper time interval type with nanosecond precision.
 
no, elapsed milliseconds should be fine
 
1:43 PM
How do you measure time taken in real life?
 
user1804599
Use an interval type anyway. Way more descriptive than int or double. With int and double, nobody knows whether you're dealing with seconds, milliseconds, minutes or lunar months.
 
anyway.. i use a StopWatch that is started right after the wc.DownloadFileAsync()
 
user1804599
An interval type encapsulates that.
 
user1804599
A duration time is probably even better. See nodatime.org/1.2.x/api/html/T_NodaTime_Duration.htm.
 
i'm not good at math btw :P
 
2:00 PM
Hello All
 
2:10 PM
I like math :) But I only got 5 hours of sleep so I may not be in tip top math shape atm
 
2:23 PM
sup nerds
 
2:35 PM
@ShotgunNinja Why would a ninja need a shotgun?
 
@RoelvanUden You there?
 
2:53 PM
@RoelvanUden I figured it out, I notice all of those assumptions. I'll have to handle those, but the initial issue I had is resolved now. Thank you for all your help, I truly appreciate your help.
 
@RodrigoSilva For distractions.
 
Ninjas have shurikens, that's all you need
And they can double jump
 
Nah. Shotgun is the new smoke bomb.
it certainly strikes fear
 
It does, but it's against the Ninja's guidelines
 
I always read it as using a shotgun as deftly as a ninja, but not actually being ninja-esc.
 
2:56 PM
A ninja kills without being seen or touch the environment
A shotgun is the exact opposite! You're no true ninja...
 
who says I'm holding the shotgun when it goes off?
 
It still makes a mess
 
A shotgun ninja knows how to kill 2 birds per pellet, thus taking out 300 birds with 1 shot.
It is all about refraction.
 
@ShotgunNinja Do you think we will even hear it since ninja?
 
@JohanLarsson - Good point - clearly it has a suppressor
 
3:02 PM
It still makes a mess
 
Jon
3:30 PM
So work blocked chat.stackexchange.com -- ugh.
Any gamedev chat rooms in chat.stackoverflow.com?
 

 Game Development

Game development and other polite discussion. Game development...
 
Jon
Yes... my room of choice... blocked by the man.
 
@Jon Ask them to unblock?
 
Jon
I have, but I imagine it will fall through. :(
 
@Jon - The upshot is that you ended up here :)
So what gaming questions do you bring with you
 
Jon
3:38 PM
Heh, I guess I could hang out here now.
No questions, just wanted to hang out with other fellow game devs.
Like @ShotgunNinja here
 
@Jon - There are a lot of people that understand gaming here, but not necessarily that actively dev in it.
@Jon - All you really need is arctan and a game loop :P
 
Jon
LOL, and lerp
Lerp everything.
 
I like making games
I just don't get much chance to
 
Jon
It is more gratifying in my opinion, than writing business applications.
Writing code, then compiling and watching it perform on screen is quite enjoyable for me.
 
Agreed.
Being able to play something you wrote is a very fun thing
Frustrating at times, but fun
 
Jon
3:49 PM
Quite frustrating, specially when you are just starting off, and every concept is so new.
But I guess that is the same with anything code related.
 
The problem with game dev is that it's so fun, but it becomes boring the instant the game is done.
 
Same with anything, really
Maintenance, maintenance, maintenance
also, I just want the time to futz around with these: gamemechanicexplorer.com
 
@ShotgunNinja No, maintenance is still fun
It's nearly impossible to enjoy a game you made (or even tested) though
 
Yeah, that's what I keep hearing
but still
Also
> According to a document, the Iranki, when Nobunaga was inspecting Iga province — which his army had devastated — a group of three ninja shot at him with large-caliber firearms. The shots flew wide of Nobunaga, however, and instead killed seven of his surrounding companions.
so much for "ninjas don't use guns"
 
I'm sure they were kicked from the clan
 
3:55 PM
Source: Wokopodio
Well duh, they failed to kill Oda Nobunaga.
lol wrong link
Oh, another one
> In 1571, a Kōga ninja and sharpshooter by the name of Sugitani Zenjubō was hired to assassinate Nobunaga. Using two arquebuses, he fired two consecutive shots at Nobunaga, but was unable to inflict mortal injury through Nobunaga's armor. Sugitani managed to escape, but was caught four years later and put to death by torture.
Nobunaga was used to being shot at (and missed by) ninjas.
 
They missed, they weren't ninjas
A Ninja never fails, he's a machine with the only one purpose
TO KILL
 
> Assassins were often identified as ninja later on, but there is no evidence to prove whether some were specially trained for the task or simply a hired thug.
Disclaimer
 
Don't you believe in your own creed?
 
Not in the posers
 
wat
!!urban Shotgun Ninja
 
4:09 PM
They called themselves ninjas, but they lack the experience and training.
 
@RodrigoSilva No definition found for Shotgun Ninja
 
!!urban Shotgun
 
hm, nothing. Weird
 
@EvanL shotgun First person to call "shotgun!" gets the front passenger seat.Usually "shotgun" is called when some smelly ass or really fuckin annoying people are going to be in the back seat. Or shotgun is the actual front passenger seat.
 
!!urban ninja
 
4:10 PM
@EvanL [ninja](http://ninja.urbanup.com/1409314) I gathered some facts about them:

Ninja don't sweat.

Bullets can't kill a ninja.

Ninja invented skateboarding

Only a ninja can kill a ninja. Regular humans are useless.

Ninja never wear headbands with the word "ninja" printed on them.

Ninja can breath underwater anytime they want.

Ninja can change clothes in less than 1 second.

Ninja don't smoke, but they do use smoke bombs.

Nin(snip)
 
" Regular humans are useless. "
 
All of those things are ONE HUNDRED FIFTY PERCENT CORRECT
disappears
reappears
 
@NinjaEcho who is ninja echo?
damn, I need to get away from the browser and make a proper bot
 
@NinjaEcho is a tool
 
YOU'RE A TOOL
I mean
uh
hi
 
Jon
4:22 PM
Free consultation over... ugh
Guy wants to create an app off of a sharepoint DB... wanted to give me a promotion to do it.
No thanks bro.
I'd rather enjoy getting up in the morning
 
@Jon - A promotion? As in advertising or as in a raise
 
Jon
He just said he could try to get me a promotion... but the guy is kinda shady
Raise + position title change.
 
Shady as in makes lots of shade?
too much McD's
 
Jon
As in, I don't want to work for that guy :)
 
4:27 PM
@Jon - What if an open bar was included?
 
Jon
LOL - Then Ballmer's peak would be in effect every single day.
 
:D
 
Jon
for a brief period of time at least.
 
speaking of Ballmer...
in JavaScript, 2 days ago, by jAndy
DEVELOPERS
in JavaScript, 2 days ago, by Kendall Frey
DEVELOPERS
in JavaScript, 2 days ago, by Abhishek Hingnikar
DEVELOPERS
in JavaScript, 2 days ago, by Ryan Kinal
DEVELOPERS
 
Jon
Cringe
 
4:29 PM
in JavaScript, 2 days ago, by rlemon
DEVELOPERS
combined for a total of 80 stars
 
but whyyyyy
 
Jon
I heard a story from a while back, where Ballmer threw a chair at one of his employees
 
because DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS
 
Jon
4:30 PM
If you haven't seen this presentation... I urge you to watch it
Highly motivational if you are a developer
 
lmfao Google "developers" and it shows you Ballmer
 
Jon
its true... lol
It is hard to get as excited as he is.. considering the guy is a billionaire
 
@Jon - Yeah, you would have to be a billionaire to buy that much coke
 
Jon
Interesting .. you could be right
 
Me: developers
Google: Steve Ballmer is 1.96m tall and 58 years old
 
Jon
4:35 PM
1. a person or thing that develops something.
 
!!urban developers
 
@KendallFrey developers Generally referring to software developers - people who program computers. Highly valued by Steve Ballmer.
 
!!urban steve ballmer
 
@KendallFrey No definition found for "steve ballmer"
@KendallFrey Steve Ballmer Current CEO of computer powerhouse Microsoft. Famous on many message boards for his inspirational talk videos, in which he gets really worked up about everything. In one video, He repeats the word "developers" many times until the crowd starts chanting, and often times now people will makes jokes in reference to this video.
 
!!urban ballmer
 
4:36 PM
@TravisJ [ballmer](http://ballmer.urbanup.com/3817530) (verb) to loudly say what you wish were true, in the vain hope of convincing other people despite all evidence to the contrary.

(noun) a nonsensical or counterfactual statement uttered with an air of desperation.
 
Jon
Someone wrote a stack exchange chat bot?
 
I think Ballmer and developers are pretty much synonymous at this point
 
@jon - Yup, Zirak did, among others.
 
!!urban steve nutmer
 
@KendallFrey No definition found for steve nutmer
 
4:39 PM
What is everyone up to? @TravisJ I finally solved the issue, I had to look at it from a fresh perspective. I have a better understanding of what Roel did.
 
Jon
Just working away another chunk of my life.
someone's gotta pay the ex-wife's bills
 
I'm not normally a .NET guy, but am writing an ASP.NET application in C# for someone, and am wondering best practice for assigning selected values in dropdowns to strings
because if they leave it blank it gives an error, but checking if each one has a value before assigning it to a variable seems tedious
some of them are allowed to be null
 
@Greg - Nice :)
@Daи - Use an int? server side so that it becomes null if the value was never assigned
 
@TravisJ hmm ok
 
Jon
what kind of error are you talking about?
 
4:46 PM
Validation error I would assume
@Daи - Are you using webforms, webapi, mvc, wpf?
 
so just int myID = Int32.Parse(ddlMyID.SelectedItem.Value);?
@TravisJ web forms, and it gives Object reference not set to an instance of an object. error
 
Ah, I think I misunderstood then (I thought you were talking about model binding)
 
Because it's null surprise
 
I was just doing string myID = ddlMyID.SelectedItem.Value;
but they are all supposed to be integers returned
so that makes sense to use int
 
Jon
SelectedItem can be null..
So in this case, you wouldn't ever be able to extract a value
 
4:50 PM
What is SelectedItem
 
@Jon yes, so what is best practice then? do an if statement for every single field to see if it has a selected value before assigning it to a local variable?
 
Jon
You could put in a fake blank item
 
Hm:

function getNotifications(id)
{
$.ajax({
type: 'POST',
url: base_url + "req/setNotificationSeen",
data: { accountID: id },
dataType: 'json',
success:function(responseData){
console.log(responseData);
}
});
}
Am I missing something obvious here?
 
@Jon yes, I use -1 as the value for the 'null' / initial selection
 
The request is being sent (console logs it), but no data is logged
 
4:51 PM
will that work (is int signed by default in C#?)
 
int myId = some default value or indicator (perhaps null with int?);
Int32.TryParse(ddlMyID.SelectedItem.Value,out myId);
 
@TravisJ ok, still 2 lines of code for every field, if that is best way, so be it
 
Jon
TryParse... however an IF(!null) would probably be faster
 
Could use Convert.ToInt32(ddlMyID.SelectedItem) and check for 0
 
@Shoe well the default value should be -1
i.e. if (value < 0) { //it's null }
 
Jon
4:53 PM
if (SelectedItem != null) { action }
Or ensure that you always have a SelectedItem..
 
ddlMyID.Items.Insert(0, new ListItem("---Select myID---", "-1"));
@Jon yes there should always be that one at least ^^^
 
Jon
If it is null, it means you don't have it selected though.
 
@Jon for my purposes, that should be a null entry in the system because it means they never selected anything
I think I see what I need to do, I was just hoping there was a better way that could be done on one line ;)
thanks all
 
Jon
you can use a single line if statement :)
 
@Jon true....
 
Jon
4:55 PM
int myID = SelectedItem == null ? -1 : SelectedItem.Value;
 
@Jon now that's what I'm talking about!
 
Jon
heh
 
int myID = ddlMyID.SelectedItem ?? -1;
:P
 
Jon
shakes fist
 
Unselected gets default value?
 
Jon
4:57 PM
that wouldn't work
bahahaha you are wrong!
 
void Main()
{
	int myID = a.i ?? -1;
	Console.WriteLine(myID);
}

public static class a
{
	public static int? i = 5;
}
 
haha, Nullables
 
@Shoe I inserted a value of -1 as selected item by default
 
gotta love 'em
What type of value do we get from the drop-down?

Well, it's an int...?
 

« first day (1286 days earlier)      last day (3652 days later) »