« first day (1153 days earlier)      last day (3789 days later) » 

12:08 AM
@Pheonixblade9 - You can also use array notation to access the dictionary
nvm, that is what I get for not reading every piece of that conversation
 
@TravisJ :)
 
12:20 AM
@Pheonixblade9 - you still here?
 
@Pheonixblade9 - How are you handling this scenario with your version control system? You are working on a new feature to deploy. A bug in a different feature arises. You fix the bug, but the new feature is only partially finished.
 
ok, you have a master branch. all bug/feature branches are branched from that. You deploy the code each week and merge it back into master. Because everything starts from master, ideally everything should go back into master easily. In your scenario, your feature would be contained in its own branch. You get a bug report in the middle of working on that other feature.
So you commit what you have to the feature branch, and create a new branch based off of master. You fix the bug in that "bug branch", and merge it back into master. You can then, if desired, merge master into your feature branch, allowing the bug fix to propogate to the new feature branch. This allows you to fix any possible conflicts in the correct place, the new feature branch.
(the original message was too long, lol)
makes sense?
 
Yup, that is what I had in mind
Just not happy about it lol
 
it's not as bad as it seems. I make a new branch for every bug/feature we have. They're all attached to a ticket.
it actually is easier than trying to cherry-pick random commits out of order.
 
12:26 AM
The thing is, the new feature changed the db structure a little bit.
 
that's fine, so you merge the bug fix into master, then merging master back into the feature should solve that conflict
ideally you'd have a dev branch that is built daily to combine all these things together
 
12:40 AM
oh god. a friend of mine is freaking out because she got rejected. I guess she needed some experience in what I get every week :P
 
haha
 
Release/5.1.0
Release/5.2.0
etc.

Tasks/5.1.0/WP-NewBornFix
Tasks/5.1.0/WP-AddUnKnownGender
Tasks/5.1.0/WP-VerifiedMember

Trunk
 
@RyanTernier something like that. and all the features/bugs get merged to Trunk as they're tested and released.
 
Tasks are the only thing worked on in working folder. Get merged into RElease when done.
Release is built on a CI Server, and released. Once in prod, the release gets merged into trunk.
Everyone has something similar. I only merge into trunk when they hit production
 
that's exactly how we do it
works well for large teams
 
12:43 AM
I got the bug fix published already :)
But I think I need to revisit the pattern I use for version control. I rarely encounter bugs so it was kind of a surprise
 
12:58 AM
until tomorrow :D
 
:)
more concise way to write this?
Console.WriteLine((new List<int>(){1, 1, 3, 5}).Max().ToString());
 
1:14 AM
Can I somehow use Linq2XML to query XML inside EF? (Like, an XQuery?)
@Pheonixblade9 Console.WriteLine(5);
 
@Benjamin ಠ_ಠ
 
(Can remove (), can use array for shorter notation, can use "" instead of ToString but I wouldn't)
 
@BenjaminGruenbaum show me an example
 
Gah no linqpad, one sec
 
what do you mean "inside EF"?
 
1:16 AM
Lol "ConsoleApplication62"
@Pheonixblade9 I want to query XML inside an SQLServer database, with TSQL I can - I want to know if I can do something similar with LINQ to Entities.
        Console.WriteLine(new[]{1, 1, 3, 5}.Max().ToString()); // @Pheonixblade9
Of course this works - but it's not really the same:
        Console.WriteLine(new[]{1, 1, 3, 5}.Max());
(Also, about my question - no stackoverflow.com/q/282391/1348195 :( )
 
@BenjaminGruenbaum thanks, that's what I was looking for
@BenjaminGruenbaum I think the top answer is correct. Are you familiar with XML functionality in SQL server?
you'll essentially have to do CREATE FUNCTION and pass in your data field that you want to operate on into that and use SQL's XML handling to parse through it
 
@Pheonixblade9 np. As for XML in SQL server, very shallowly.
 
That makes sense, I just thought it'd be really cool if you could suddenly use LINQ to XML inside LINQ to Entities (although based on how LINQ to XML is coded it wouldn't really be the same LINQ to XML)
With PostgreSQL now doing JSON queries and everyone excited about it - I just remembered SQL server has been doing XML queries for quite a while, wondered if someone wanted to or actually used SQL server XML documents for storage of 'non tabular' data
 
that's kind of an old way of doing things.
we do that to some extent. It was considered best practice around 2005.
now (correctly, I believe) normalization of data is favored.
that is, instead of putting it in an XML document, build your tables around what would be in that document
 
1:30 AM
The use case is: we have a lot of code (~150K lines) of hardcore C# business logic for downloading articles, performing natural language processing, classifying data. building portfolios, and so on. After that we need to dump the data in a format we can show users.
However, we also need to be able to query it, and add/edit things on the fly sometimes.
So we need querying - but not too powerful, something people would use Mongo for if it had transactions. Maybe something that Raven would do well.
I'm wondering if SQL server can accommodate the "denormalized for client, shallow querying, flat, non-schematic and fast" criteria already and introducing another DB is just plain stupid.
 
if you want non-schematic data, you should use a document store NoSQL DB
A document-oriented database is a computer program designed for storing, retrieving, and managing document-oriented information, also known as semi-structured data. Document-oriented databases are one of the main categories of so-called NoSQL databases and the popularity of the term "document-oriented database" (or "document store") has grown with the use of the term NoSQL itself. In contrast to relational databases and their notions of "Relations" (or "Tables"), these systems are designed around an abstract notion of a "Document". Documents The central concept of a document-oriented...
but for now, it's time to go home. I'll be back tomorrow if you have more questions
 
 
1 hour later…
2:55 AM
@KendallFrey i found more fun to spam in here than on javascript c.r. .xD
 
 
2 hours later…
5:22 AM
@KendalllFrey
@CCInc
@RyanTernier
 
'twas pinged out of nowhere, once late at night....
 
lol
your the only one I know that I could bother
hey, what's the point of Delegates like this
Func<string,int> returnLength;
returnLength = delegate (string text) { return text.Length; };
Console.WriteLine (returnLength("Hello"));
like, why wouldn't you just make a new function called return length? why use a delegate?
too late for Delegate talk?
 
Eww.. delegates. I've only used delegates a few times and it's soo late, so yeah, sorry :)
 
I'm trying to go through Skeet's book again , I bought it a while ago and never really got through it, so much delegate talk , I ususally try to ignore it
 
Do you have C# reference 5.0 in a nutshell?
 
5:32 AM
async and await?
 
5:48 AM
Delegates don't make sense in that case. Probably because it's a toy example.
Delegates make a lot sense in other contexts, though.
I'm no pro, but think about something like EventHandlers. You have events and you can add arbitrary functions to execute whenever these events happen.
 
 
1 hour later…
7:10 AM
morning!
I'm ex-jim
 
Hii
 
morning!
 
v gud morning
i have a query
i have a json data
after serializing by below code

var serializer = new JavaScriptSerializer();
                dynamic obj = serializer.Deserialize<dynamic>(myParam);
how can i get the key name if i don't know the name of the key
 
use a known type instead of dynamic
 
i don't have known type
 
7:23 AM
then create one
how the json looks like?
 
{"Id":"fhffh", "Name":"jjnb","Value":"1"}
or
{"Id":"fhffh", "Name":"jjnb","Value1":"1","Value2":"1"}
id and name is fixed
 
and value1, value2, valueN has a dynamic number?
 
yes
its name may be different
 
without fixing the json to have a collection of values you can not handle them correctly
maybe you could try to serialize it to Dictionary<string,string>
then put all data in a correct known type (fixed name and id properties and a collection for the valueN stuff)
 
ok
- obj {System.Collections.Generic.Dictionary<string,object>} dynamic {System.Collections.Generic.Dictionary<string,object>}
i m getting this
in quick wath i m geeting the first key like this
(new System.Collections.Generic.Mscorlib_DictionaryDebugView<string,object>(obj as System.Collections.Generic.Dictionary<string,object>)).Items[0].Key
 
7:34 AM
the dictionary second type argument should be string
 
but in quick watch i m getting dictionary<string,object>
 
i see
and in the code iterating throuh the dictionary can you get all key and value correctl (id, name and valueN as key)?
and the values are strings?
 
m only geeting in quick watch
unable to get it on code side
 
any exception, how the code looks like?
 
in foreach m getting only by taking same dictionary structure
but i want to iterate using linq or lambda
 dd.Keys.Where(e => e.Equals(propname)).Select;
 
7:45 AM
first i would map everything into a knowntype
 
Hi i have one doubt.
How to choose a file without openfiledialog?
 
Dictionary<string,object> dd=obj as Dictionary<string,object>;
dd.Keys.Where(e => e.Equals(propname)).Select;
@PeterKiss- i dont have known type
i have one type class name i m getting in string
then i find the type from class name
and then from this type i got the propertyinfo
now for each property name i have to get the values from dictionary where key match with property name
 
no9
goodmorning
 
@SwatiSinha so you have a type and you want to create an instance of that type and then fill it's properties from the deserialized dictionary
 
yes
 
7:54 AM
then collect that type properties with a public setter this can be done throught it's Type instance and then create an instance of it and iterate throght the collected properties and use the dictionary TryGet() method
the problem can be that you maybe have to cast the values
 
Type type = System.Reflection.Assembly.Load("NamespaceName").GetTypes().First(t => t.Name.Equals(classname));
object instance = Activator.CreateInstance(type);
PropertyInfo[] propinfo = type.GetProperties();
now i have instance and property info and on iterating property info i have to match the property name with any key in dictionay
but on iterating propertyinfo i have to write a lambda that search propertyname into dictionary keys
m stuck in this lambda
 
why would you need any lambda expression for this?
inside a foreach loop you can you the propertyInfo.Name to get value from the dictionary
dict.TryGet(pi.Name, out value);
 
i have done this till this line
but now again issue is how to get value in exact type
as it was coming in json from jqgrid
jqgrid takes only in string
 
the propertyinfo has information about it's type so you can use the Convert class i think
 
convert class... ?
 
8:23 AM
System.Convert
ChangeType method
then you can call the propertyinfo SetValue method
 
8:41 AM
got a question
I have radio group with two radio buttons, one is "yes", other is "no". I've bound the first one to my EF entity's (just an object's) property "IsUnlimited" like this:
        rbUnlim.DataBindings.Add("Checked", _currentRace, "IsUnlimited");
when i click radio buttons for many times, the IsUnlimited property changes from "false" to "true" for one time and never changes more. What's wrong?
 
9:06 AM
ok, i should have set DataSourceUpdateMode to DataSourceUpdateMode.OnPropertyChanged
 
Hello All..Good Afternoon..:)
 
Its still morning here but hi
 
1.12 pm here :)
Hi Armenia
 
LOL love that name.
denmark here should be Linq2snaps
 
morning
 
9:14 AM
@DaImTo yeah :)
 
@razor morning
 
would america be Linqtofastfood?
or linqtoguns
 
linq2democracy ;)
 
not sure about that one.
 
/sarcasm
 
9:17 AM
linqtotea british.
 
2musics i beleive. They've made a lot of
 
Oh @razor you should be linq2waffles :)
 
@DaImTo linq2waffles?
 
im going to stop now
 
N-Tea-Tea Framework for UK
 
9:23 AM
LOL
@DaImTo seems your happy today :p
 
think i have finaly figured out the data issue i was having yesterday.
 
9:46 AM
ah okay good :)
@DaImTo I have a question for you
My boss made an Sql Query. When he runs the query on Sql Server 2008 R2 the query shows the correct results, but when he runs the query on Sql Server 2005 the results don't match.
@DaImTo
 
impossible
let me look at the query
and what's exactly incirrect? order?
 
haha
1 moment, my boss is sending me the query
Okay the query @LINQ2Vodka
SELECT
       [UREN].[DOSSIERNUMMER]
      ,CONVERT (VARCHAR (10),[UREN].[DATUM_VERR],103) AS DATUM_VERRICHTING
      ,[DOSSIERS].[ZAAKNAAM]
      ,[DOSREL] . [RELATIE]
      ,[DOSREL] .[WEDERPARTY_TF]
      ,[UREN].[MEDEWERKER]
      ,[UREN].[RELATIE]
      ,[RELATIES].[VZ_NAAM]
      ,[RELATIES].[POSTCODE_VOOR]
      ,[UREN].[TYPE_VERR]
      ,[UREN].[UREN]
      ,[UREN].[BEDRAG]
      ,[UREN].[SOORT_UREN]
      ,[UREN].[DECLARATIENR]
      ,[UREN].[GEDECLAREERD_TF]
      ,[UREN].[OMSCHRIJVING]
When my boss copy paste this and execute against Sql Server 2008 R2 result is Perfect!!! But against Sql Server 2005 result is not good..
 
very simple query. Should produce absolutely same results if target tables contain same data
 
are you quering the same database?
 
what's exactly incorrect? rows count? rows order?
 
9:53 AM
Are you sure the data isnt diffrent in the two databases.
 
No, he ran the query against a testing database on our local server (Sql 2008 R2) and ran the Query against a Sql 2005 at Customers server
of course the data would be different
 
so what's the problem?
 
@LINQ2Vodka the problem is at this line: AND [DOSREL] . [WEDERPARTY_TF] = 1
 
which problem? Error message?
 
that line should filter out the values to show only the value '1'
no error message
it's not filtering
 
9:54 AM
:) not possible
 
It should return only the records where [WEDERPARY_TF] = 1
 
let me think for a while...
 
but it also returns [WEDERPARTY] when it's value is '0'
 
the only possible reason is that boss selects and run not entire query
 
and that reason is not the case
if he selects the entire query it still shows the wrong resukts
results*
 
9:59 AM
ok, let him run subsequentially the following:
SELECT [DOSREL].[WEDERPARTY_TF]
FROM [CClawDamste].[dbo].[CCLAW164] AS UREN
INNER JOIN [CCLAW140] AS [RELATIES] ON [DOSREL] . [RELATIE] = [RELATIES].[SLEUTEL]
WHERE [DOSREL].[WEDERPARTY_TF] = 1
no, sorry
wait
this one: SELECT [DOSREL] .[WEDERPARTY_TF]
FROM [CClawDamste].[dbo].[CCLAW164] AS UREN
INNER JOIN [CCLAW210] AS [DOSREL] ON [UREN] . [DOSSIERNUMMER] = [DOSREL] . [DOSSIERNUMMER]
WHERE [DOSREL] . [WEDERPARTY_TF] = 1
will it give anything but "1"?
ah i see!
this line:
AND ([UREN] . [SOORT_UREN] ='CU' OR [UREN] . [SOORT_UREN]='CI')
put brackets
otherwise "OR" affects other conditions
 
okay thanks
I'll let hem put the brackets
in the query
1 moment
I'll let you know if it works
Thanks @LINQ2Vodka it works now
thanks alot!
I owe you 1 :)
 
10:15 AM
@LINQ2Vodka How did I know you were Russian?
 
no idea lol
coz Vodka is definetely an African drink
 
Mmmn, really?
 
you're seriously?
 
I just happen to know a Russian and some Polish folks that drink a lot
 
hehe
 
10:18 AM
@LINQ2Vodka ?
Why won't I be?
 
we do
not everyone and not always
 
Of course. But you guys are popular for that ha
 
but... i need to perform SELECT to my icebox now :)
 
Lol
 
i know...
also it's winter all the time here, winds, bears, snowfalls
Red Square is just in the middle of a huge forest
 
10:20 AM
Even in the summer?
Do you drink Vodka straight as well?
 
we dont drink vodka at holidays. Instead, we drink pure spirit
 
I mean straight Vodka anytime
But pure spirit works as well lol!
 
sure
 
An aggregate may not appear in the set list of an UPDATE statement. <-- so i cant update a column with sum(qty) !!!
 
@DaImToyou can probably do it like "update table set field=(select top 1 foo from bar)"
 
10:25 AM
wont work the select is insane
think im stuck with the cursor thats going to take forever
 
can you show?
 
update fpurchline set wReceivedQTY = case when INVENTTRANS.StatusReceipt = 2 then sum(INVENTTRANS.QTY) else 0 end ,
wRegisteredQTY = case when INVENTTRANS.StatusReceipt = 3 then sum(INVENTTRANS.QTY) else 0 end ,
wArrivedQTY = case when INVENTTRANS.StatusReceipt = 4 then sum(INVENTTRANS.QTY) else 0 end,
wStatusReceipt = StatusReceipt
from fPURCHLINE as purchline,dINVENTTRANSORIGIN as INVENTTRANSORIGIN ,tINVENTTRANS as INVENTTRANS
where INVENTTRANSORIGIN.REFERENCEID = purchline.PURCHID
and INVENTTRANSORIGIN.DataAreaID = purchline.DataAreaID
my testdb alone has 133k rows customers going to have a lot more thats going to run forages.
 
option #1: pre-select all SUMs as a table, then merge
let me think of #2...
 
can you do an insert into with a sum?
 
insert into target(k, v) select (key, sum(value) from source) - like this, yes
 
10:31 AM
cursor has run for 6 minuts and only done 30k rows. thats not going to work.
 
the point is to make aggregations not over updated rows
i'm pretty sure you got no needed indexes that's why it's so long
 
indexes are there
 
look at the execution plan and check out what's long
 
the fact that it has to run one update for each row is what takes so long in the cursor
 
mass update is a set of single updates too
can you show me the execution plan?
 
10:34 AM
if i run that big update with out the sum its done instantly.
 
@LINQ2Vodka Sorry to interrupt your conversation, but your nickname made me laugh
 
@AndréSilva me to :)
 
@AndréSilva thanks, i love it too :) Yesterday i was "jim". So boring.
@DaImTo you updated w/o using SUM, right?
 
yeah sum is calcuated in the cursor
btw this is a multi dimensonal database im loading here
 
@DaImTo need to know more details to take the best decision. Depending on source tables rows count, source and dest hit rate and indexes you have there may be variuos solutions. One of them is to pre-populate table with SUMs, the other is to check how indexes are involved and add/change them as need... I could ask you to send me all these tables and would find a solition, but currently i'm working and only can speak here sometimes or answer a simplier questions. Sorry :)
 
10:40 AM
I've seen many people talk about cursor in Sql, what the heck is a cursor in sql? (Sorry, if it seems like a noob question lol)
 
Cursor is OK for some purposes.
 
still don't understand...
What is a "Cursor"? Is it a result of a query, is it the flashing "|" when typing a query??
I've got no clue
 
this is a kind of pointer on selected records. You can move over them
you declare cursor for some SELECT statement and then can use it to loop thru result rows
 
ah so you can see what value is in the pointer?
@LINQ2Vodka
 
not directly... you can fetch values from the current row and put it into variables
 
10:46 AM
hmm... you have an example?
 
hahah
np
 
simplier, cursor is also a rows iterator
 
kk, thanks :)
@LINQ2Vodka you got some knowledge about Outlook Object Model??
 
nope :(
 
10:55 AM
too bad :(
I need someone with knowledge about the Outlook Object Model.....
Microsoft can't even help me with it..
 
docs?
 
docs?
what do you mean with that?
I got an open question on SO
Have a look
4
Q: Saving only the REAL attachments of an Outlook MailItem

RaZorI'm currently developing an Outlook Addin which saves MailItems and Attachments in my MSSQL Database. I got a method where I save the MailItem with all it's attachments. But if I save all attachments the embedded images in the MailItem are also saved. Does anyone know how to save all real attac...

 
no9
@RaZor I still have problems :/
good day btw
 
i mean, did you read docs? why they're not helping?
what i really hate is DevExpress...
 
no9
1
Q: Pausing a new BackGroundWorker until previous completes

no9I am struggling with threading. The problem is when I am iterating trough foreach loop. When setting this.Document, the application performs login, that is triggered with an event and takes few seconds to complete. In the worker_RunWorkerCompleted method I need to perform some actions that depen...

is this even possible?
I tried with AutoResetEvent but no luck...
 
11:06 AM
@LINQ2Vodka I've been struggling with this for about 2 months now, I've read many many docs.....
 
@no9 Look at my response
writing now
 
no9
ok
man im sad ... wasnt enough a beat down from the last episode of "Sons Of Anarchy"... now this threading is making my day a living hell
 
@no9 what season are you at with SOA?
I just started Season 4 yesterday :p
 
no9
yesterday I checked s06 finale
so sad...
 
11:12 AM
hmm don't spoi :p
spoil*
season 7 is coming soon though
 
no9
@RaZor how do I use this... as it is now, just calling the .WaitOne(); and .Set(); from this class?
i never spoil
 
Season 3 was a sad season for Jax to lose both his son and Tara
Holdon
@no9 edit made, I've made a few methods for you which are easy to use, :)
 
no9
ok let me check
do I ignore the previous class you posted?
 
yes
the class wasn't nice...
The methods should be easy to implement and use
 
no9
_busy
what is this?
 
11:20 AM
moment
it's from a project I made years ago.. Haven't used it since
 
no9
should I use only one worker? currently i am making them for each item in dictionary...
 
edit made
yes, why would you use multiple background workers
 
you don't want to handle each item in the foreach loop at the same time
@tranceporter whats ur point with thaT? :P
 
i just drop in from time to time :)
spread joy.. ahem..
 
11:22 AM
hahahaha
@no9 handle 1 item in the foreach loop at a time
 
no9
man
:)
it was because it was busy every time
the next item in loop triggered before the worked did its job...
what do you mean?
 
You should run the foreach loop inside the background worker DoWork method
I can give you an example 1 moment
Look at this worker.DoWork method
//Backgroundworker maken en uitvoeren
			var bg = new BackgroundWorker();
			bg.DoWork += delegate
				{
					//SqlConnection maken voor uitvoeren SP
					var cn = new SqlConnection(Instellingen.Instance.DmsConnectionString);
					//SqlCommand maken voor initialiseren SP
					var sqlCom = new SqlCommand("DossierFoldersGewijzigd", cn)
						{
							CommandType = CommandType.StoredProcedure
						};

					//Paremeters maken en meegeven aan sqlCom
					var dossiernummer = new SqlParameter("@dossiernummer", SqlDbType.Int);
this is a method which polls the Sql Database every 7 seconds to see if there are changes made to the database
 
no9
i dont see how this helps...
putting entire foreach in the doWork
isnt that the same as running everything in the main thread?
 
It shows you that running your foreach loop inside the DoWork makes it handle item by item so the next item won't be triggered if the previous 1 isn't done yet
If this still doesn't fix your problem, then I'm out of solutions for you....
 
no9
ok i will try
 
11:35 AM
=]
 
no9
ok i have the entire foreach loop in the doWork method ... the main goal of this method is setting this.Document that actually triggers the login events
can you just help me place the worker methods?
cant figure out where to pause and resume properly
 
you still need to pause and resume the bg?
@no9 where is your code?
 
no9
i am editing it ...
still testing
yea I know .. Im a noob :S
i dont know man ... using the entire foreach loop in the doWork method isnt helping ... the this.Document is getting overwritten in every loop...
I am missing something you are trying to tell me...
i need a smoke....
 
kk
@no9 be back in a bit, lunch time :)
 
11:55 AM
@RaZor Ew. SQL polling.
That's almost as bad as police officers going door-by-door to ask if there has been trouble.
 
im bored...
 

« first day (1153 days earlier)      last day (3789 days later) »