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

12:00 PM
if (isBored) watch<Anime>(); :o
 
pass on the anime
 
12:12 PM
Anime is awesome
Bleach, Naruto, Code Geass, Sword Art Online, Tengen Toppa Gurren Lagann
more than i can count
<== geek glorified
 
Amen, my anime brother.
 
sorry guys i left anime behind about 20 years ago
 
And now you live a bored life. Great choice you made ;)
 
More like anime left you behind 20 years ago
 
@DaImTo start watching Sons of Anarchy :)
It's awesome!
 
12:18 PM
btw we are not talking aboout Johnny Bravo and Toonami
 
@RoelvanUden @RoelvanUden I have to poll with the Sql Database because my folder structure which is in the database has to stay up to date
 
I'd say as far as reality shows go, Top Gear UK is preety good
pretty*
 
@RaZor Jax's estranged meth-addicted wife Wendy, pregnant with his child, collapses (pass)
 
@DaImTo been there I see
@RoelvanUden if user x added a new folder then user y, user t etc need to see the folder aswell
 
@RaZor Is there no way for your application to simply raise events when adding rows to SQL to have real-time low-cost change notifications?
 
12:20 PM
@RaZor nope en.wikipedia.org/wiki/Sons_of_Anarchy <-- been there
 
so does the database have to stay up to date, or the cache which is coming from database @razor?
coz if you are getting stuff from database and updating your cache, you can use SQLChangeNotification ..
 
hello IT-guys!
 
@GeloVolro Hello rainbow-avatar man!
 
@RaZor ran away i think
 
Nope ;)
 
12:23 PM
I am an impatient prick. I like people to answer fast lol
 
@RoelvanUden the way I'm handling now is working great and don't give and problems, and I have no clue if there are better ways to do it
 
If it aint broke, dont fix it @RaZor
:P
 
@tranceporter I know, but I got work to do so I can't answer right away, I try to, but sometimes I can't
Exactly @tranceporter
 
Guys, what dou you think?

If I want to make some troubles for my current employer by developing all server-side in F# instead of C#, would it be painful for him?

Thanks!
 
12:24 PM
Depends if he got knowledge on F# :p
 
someone asking sabotage advice on SO
 
that ain't the right place, but since we are here to help I think we should help :p
 
@RaZor Usually when you start using polling techniques, you set yourself up for disaster in the future. Polling is extremely CPU-heavy and if you want to scale for a larger number of people, you need either extreme server hardware or a rewrite of code anyway.
 
Anyone listen to Epic trance channel on di.fm?
 
@GeloVolro VB would be worse.
 
12:25 PM
Listen to Ori Uplift - Uplifting Only 17
 
@RoelvanUden do you have a better solution?
 
@GeloVolro What? No? F# is perfectly readable.
 
playing now
 
@RoelvanUden this method is programmed by a Microsoft Expert :p
(Which is not me (gets very sad now))
 
12:26 PM
(thinks cobal ... shivers)
 
@razor, how real time does it need to be?
 
real real real time :p
it's a Document Management System
 
for example, if 5 users add folder, does the 6th user need to see it immediately, or you could queue entries, and then dump them in bulk to sql?
 
@RaZor he scares even about new features in last C# specification, but I have thought about F# , because when he saw one Lisp program, he got very pissed.
 
@RaZor You can connect each client to a service point that broadcasts changes as they happen. @tranceporter mentioned a SQLChangeNotification, so you can get those and redistribute them to each client in real-time. The CPU overhead is virtually non-existent, and it is absolutely realtime. Better for user experience AND performance.
@GeloVolro Why do you want to make your employer pissed? :/
 
12:27 PM
@GeloVolro why would you even sabotage anyway
 
Seems counter-productive
 
SQL dependency is low cost
if you pair that with caching, it's the mutts nuts
 
@RoelvanUden I don't have any experience with Services and I don't have time to learn and implement now.. this software has to be delivered.....
asap
 
It's very easy @razor
turn on broker service on your database, which enables SQL serve r to send notifications
 
tutorial?
 
12:28 PM
and in your c# code, trap that event in your cache class, and update cache
let me check my bookmarks
 
Everything you push out to clients has to be maintained. If you really must push it, then go ahead, but prepare for the nightmare ahead :3
 
@RoelvanUden what nightmare could appear?
 
it's maybe readable, but hard to understand some featues, for e.g. Anonymous objects:

http://msdn.microsoft.com/en-us/library/dd233237.aspx

I've tried to give to some developers one my F# program, and the option above as hard for understanding for them ( with mixing other feautes )

PS
I want to punish my employer, because he is rude to me
 
Oh you know, the usual. Software breaking down seemingly randomly, servers being strained and becoming unresponsive, angry clients calling your employer, torches and pitchforks, etc.
 
12:30 PM
The only thing that wil happen now is that IF there is a new folder added, renamed or deleted, the application gets updated, otherwise nothing is done
 
I would create a singleton cache @RaZor
check Jon Skeet article hee
So the cache will have static consructor, and would instantiate on app_start
and populate itself from folder structure database table
then you wire in SQL dependecy in cache class
 
I already lost you at "I would create a singleton cache"
 
so every time you add/updae record in folder structure table, it will fire change notification, which you can trap in cache class, and reload cache from folder strcuture database
thread safe singleton cache
check out the link
 
@GeloVolro Sabotage is beyond just rude. Have you ever considered.. gasp.. talking?
 
as an example @RaZor
public class LogSettingsCache
{
private static readonly LogSettingsCache SettingsCache = new LogSettingsCache();
private readonly IEnumerable<LogSetting> _logSettings;

[SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1409:RemoveUnnecessaryCode", Justification = "This is required so that the cache is initialized on application start")]
static LogSettingsCache()
{
}

private LogSettingsCache()
{
if (_logSettings != null)
{
return;
}

using (var context = new LoggingContext())
{
_logSettings = context.LogSettings.ToList();
 
12:33 PM
and that should be programmed in a Windows Service??
 
normal class man
put it anywhere you want
 
so no service is involved then?
 
youo can refactor and move it to different class library later
nope, no service
 
@RoelvanUden I have tried to talk face to face, and have said that I don't like such way of talking to me from himself in very polite manar, but he doesn't want to talk normally. So I would to like to go away from company later and make such a surprise.
 
use a cache class like that, with sql notification
SQL Server has built-in broker service to watch the table you specify and send notifications
 
12:35 PM
Awesome, I'll look into it later, but I'm gonna need your help alot the next few days if I'm going to implement this!
 
lol sure
However
 
ah oh
 
you will need to implement the other half
which polls the folder structure in windows
and insert a record in the database :)
Then SQL notification side will take over, fire the notification, cache will reload itself after trapping the event
 
@GeloVolro Just strip all class, method and variable names. Remove all comments. That'll be annoying enough. Still, pretty sad way to leave a company.
 
and all users will see the updated data from the cache
makes sense?
 
12:36 PM
A little :p
 
lol. 2 sides to your app man. One side polls windows folder and inserts into table
 
Is it possible to c# to access a webpage, send a javascript to run and return an element ?
 
other side polls the table, fires notification
 
@razor Hi...:)
 
windows folders aren't involved xD
 
12:37 PM
I'm trying with WebClient but I don't think I can do it
 
@Smrutiranjanjena heya
 
well, which folders you are monitoring lol
whichever *
SQl notification is SQL -> client
you need to implement client -> SQL
 
@tranceporter stop hold on: let me tell something to clear things
 
@razor There was no endpoint listening at 10.0.0.22/ConfigService/DomainManagerService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
 
@RoelvanUden I also think about adding some hell algorithm work in program to make not only unreadable, but also undebugable as much as at could it be.
 
12:38 PM
Do you have any idea ?
 
@Smrutiranjanjena I have no idea what you are talking about :p
@tranceporter there are no folders from windows explorer involved in my application. The folders in my application are just simple Sql Data.
 
Anyone ?
 
My table structure looks like this 1 moment
 
ok, so shall i assume that there is a mechanism which inserts/update that table?
 
yes there is :)
 
12:39 PM
and that it's working?
 
@RaZor Breaking this down to the bare minimum; stop polling. Get the change event from SQL and then refresh all data. Congrats, you just stopped useless polling. :P
 
hell yeah it's working :)
 
excellent
now, every time the record is insered/updated in SQL, you want to be notified, correct?
lol, @Smrutiranjanjena wording it like a SpecFlow story won't help
It clearly says that your service is not being hosted correctly..
 
sort of yes: if user x adds a new folder I want to automatically update the treeview of user y
 
12:41 PM
lol @RoelvanUden
 
@Smrutiranjanjena Sorry can't help you right now, getting lectured..
 
Let me break it down into 2 things:
1] User adds a new folder
2] You want to be notified
 
yeah
 
From what you tell me, aprt 1 is working, right?
 
yes
 
12:42 PM
coz that involves inserting/ updating recors in SQL
 
that ain't hard to do
 
cool, then the second part is handled by sql notification
read the msdn article i gave you
 
ok
give me some time to read it (bad concentration lol)
 
but before that, I would write a simple class which acts like a cache. :) The LogSettingsCache, copy it somewhere locally, so you can review later. It has Jon Skeet implementation of thread safe singleton
This cache will not have SQLDependency at the moment. Don't worry/
Once you have normal cache working, we will wire in SQL Dependency to it
brb from lunch
 
Okay, I'll read the article and wil start implementing stuff
Have a nice lunch @tranceporter
 
12:48 PM
@RaZor Read the whole section actually. If you look left, there will be "Using Query Notifications" section
 
ok, I got 2 links
which one you talking about?
this
 
use the one i sent now
thats the one you want
 
kk will read it :)
Thanks
 
12:49 PM
for the singleton cache
look at the code i pasted
copy to some file on yoour box for further reference lol
 
yeah copied it into a new CS file
 
no9
man
:)
 
sup?
 
no9
wanna hear a sick joke?
 
12:56 PM
sure
 
no9
son comes from school ...
and he asks his father
 
any1 knows about iis7 settings
?
 
no9
daddy, daddy ... whats a transvestite?
 
nope sorry
 
no9
daddy replies:
ask your mom
he knows...
 
12:57 PM
@no9 xD that was an abvious answer off daddy
 
That joke is tame
 
no9
ah well
@RaZor how about this solution ... to my problem ... I put the loop in the doWork like you said ... then If i set System.Threading.Sleep(5000) it works
but its a lame solution ... so I wanted to use Thread.CurrentThread.Join() .. but that doesnt work ok
it is only hit once ...
so there must me something wrong ....
 
I'm out of solutions @no9 plus I got somethings to learn before @tranceporter gets back :p
 
no9
ok man, I appreciate your time and effort
 
1:07 PM
your welcome, sorry I could't help fix your problem....
 
no9
may the force be with you :)
 
hehe I'll need it!
 
Hi Guys, bonjour!
<?xml version="1.0" encoding="utf-8"?>
<borders size="10">
  <border>
    <enabled>False</enabled>
    <name><![CDATA[plain white]]></name>
  </border>
</borders> How can i get the value of the node 'name'? I tried like this '"/borders/@size/border/enabled"' followed by 'string bordername = xn["name"].InnerText;' but it didn't work.
 
heya @linguini
sorry no clue, got poor xml experience
 
1:20 PM
@RaZor no problem.
 
@KendallFrey I thought this was a C# only channel?
 
C# and fun
 
Ow and now it is for fun aswell?
Lets play hangman :) That is fun!
ow well, the invisible cow game is pretty lame...
 
but so addictive
cow cow cow cow COW COW COW COW COW COW COW!
 
1:37 PM
right....
 
1:54 PM
i bet trying to solve my EF problem would be fun for you :P
0
Q: Saving an Item in EF with existing childrens

Luis TellezIm having some problems saving an object (FeatureType) that have a 1-M relationship with Section. public class FeatureType { public int Id { get; set; } public string Name { get; set; } [ForeignKey("SectionId")] public Section Section { get; set; } ...

 
Hi , to save data in a standalone app would it be better to use something like SQLite or serialize the data in a XML? Data like a contact list.
 
@LuisTellez how do you add an existing item? Do you get it from DB within te same context?
 
If its just one client connecting you might want to go with the XML, it would be easier
@LINQ2Vodka its a dropdownList, and to add the Section, i get the ID from the form, and then try to get the Section from my Section repository, then i just use ItemTypes.add(mySection)
 
so the entity is in 2 repositories at the same time?
 
That awesome moment when you realize you forgot the syntax for a command-line app... then you realize you entered it right anyway.
 
1:59 PM
@LuisTellez
 
@LINQ2Vodka Yes, and thats the problem
@LINQ2Vodka i understand the problem but have no idea of how to avoid it
 
@LuisTellez you should create the second entity as detached from 1st conext
let me check how to do it...
 
I am back bitches, then man with te plan
Mac daddy, he even has a hologram
 
@LINQ2Vodka i updated the question just in case it clarify more.
@LINQ2Vodka and i tried to just create other entity with an Existing ID as i would have in Nhibernate, but it just overrride the ID and create a new empty one
 
maybe AsNoTracking() could help
will think a bit more...
 
2:03 PM
let me read something about it
 
@LuisTellez msdn.microsoft.com/en-us/library/gg679352(v=vs.103).aspx this makes entity detached
but i think there's another solution
 
Morning everyone!
 
i think you should query the existing entity within your target context and add it to main object
 
@LINQ2Vodka this would break my current design, i have a repository for each entity, and i have no idea how could they share the same context, and only for that request and not for everything (that could create a mess)
 
@LuisTellez I would use a using block everytime i work on an entity
and create a new instance of a context
 
2:08 PM
2
Q: Entity Framework: adding existing child POCO to new Parent POCO, creates new child in DB

MakkyNZIm wanting to use Entity Framework POCO in a disconnected (from context) mode. In my scenario I'm creating a new Parent object and want to attach an existing child object to it and then save it to the db. The code below undesirably inserts a new Course record when saving a new Student record, w...

 
@tranceporter im doing that, but then i have this problem.
@LINQ2Vodka Thanks, let me check it, i was going to try the non tracking
 
check the linq that @LINQ2Vodka posted
 
Need xpath help.
 
not me (xpath)
 
@LINQ2Vodka ok
<?xml version="1.0" encoding="utf-8"?>
<borders size="10">
  <border>
    <enabled>False</enabled>
    <name><![CDATA[plain white]]></name>
    <horizontal>
      <path>border-h.png</path>
      <width>1500</width>
      <height>1050</height>
      <alpha x="140" y="140" width="1221" height="771" rotation="0" />
    </horizontal>
    <vertical>
      <path>border-v.png</path>
      <width>1050</width>
      <height>1500</height>
      <alpha x="138" y="140" width="771" height="1221" rotation="0" />
 
XmlNodeList nodes = xmlborder.SelectNodes("/borders/border/enabled/name");
                if (nodes != null)
                    foreach (XmlNode node in nodes)
                    {
                        MessageBox.Show( node.InnerText);
                    }
            }
 
so what's not working @linguini
 
@tranceporter I'm not getting the text of the node 'name'.
 
debug @linguini
put breakpoint at if (nodes!= null)
check if nodes if not null. then in the for loop, check what node contains
highlight node, and press shift + f9 in visual studio
check which property of node has the text you want
@linguini
if (child.NodeType == XmlNodeType.Text ||
child.NodeType == XmlNodeType.CDATA)
{
string text = child.Value;
// Use the text
}
 
@tranceporter 'name'
 
2:16 PM
your nodes collection is empty
so your xpath is not working
 
@tranceporter How come, we have the value in the node 'name'.
 
that's because name node is not inside enabled node
 
@tranceporter so what should i do?
 
XmlNodeList nodes = xmlborder.SelectNodes("/borders/border/name");
now check what nodes collection has it. it should have elements
 
@tranceporter still it has count 0
 
2:19 PM
@tranceporter is this a good article??
 
Hey all, can someone peer review my edit :)
http://stackoverflow.com/questions/20545540
 
@RaZor
that's the one i used as well
good find! :)
How do you find sql dependency? not that difficult eh? ;)
 
haha, nice! :) I'll use that one to implement makes more sense, the articles on MSDN have way to much information.. My writing english is good, but my reading english sucks.. I noticed that lots of english words are there that I just don't understand @tranceporter
 
lolol.. i know what you mean :D
@linguini awesome. what xpath did you use? seems like you have nodes now ?
and i would modify the if condition to:
if (nodes != null && nodes.Any())
that way it will not execute ForEach statement for null or 0 count
 
2:38 PM
@LINQ2Vodka you still there ? I tried ussing the AsNoTracking, but it do the same as when I create a new object, i just insert a new one.
 
MDX is going to be the death of me
 
@LuisTellez you probably also need to set its state as "unchanged" in the tracker. But please read the ling i gave before, there is a number of approaches for that
 
Yes, the problem is i do not have dirct access to the context
direct*
and cant access others factories contexts
 
@LuisTellez look... Contaxt doesnt have idea if the object exists in the database, it only haZ a local copy of obtained data or data added by you. If you add an entity, it will have "added" state by default and will be posted into DB. You need make tracker know it doesnt have to do something with this entity
so, to make context not insering a new record you should attach the one with state as "unchanged". It is possible either via direct setting or retrieving the existing row from DB - in this case it'll have that state
 
@tranceporter I'm performing some queries on my database but it takes epic long.... running like 5 mins now and still not done......
USE DMS;

CREATE QUEUE DossierFolderChangeQueue;
CREATE SERVICE DossierFolderChangeService ON QUEUE DossierFolderNameChangeQueue ([schemas.microsoft.com/SQL/Notifications/PostQueryNotification]);

GRANT SUBSCRIBE QUERY NOTIFICATIONS TO NETWORK_SERVICE;

ALTER DATABASE DMS SET ENABLE_BROKER;
@tranceporter why is it so slow?
 
2:44 PM
Not sure to be honest
let me check
 
hmm could it be because I'm running the queries from my local machine to the network Sql Server?
 
22
Q: Enable SQL Server Broker taking too long time

David.Chu.caI have a Microsoft SQL server 2005 and I tried to enable Broker for my database with those T-SQL: SELECT name, is_broker_enabled FROM sys.databases -- checking its status 0 in my case ALTER DATABASE myDatabase SET ENABLE_BROKER The Alter Database takes long time to process. It is now over ...

read the link in the answer first
lol
see what the implication of "rollback immediate" are
 
okidoki
 
vodka time...
 
LOL what time is it at your place? Pp
:p
hopefully after work hours xD
 
2:47 PM
6.46 pm
i'm a freelancer :)
 
work hours right now ;)
 
yep
 
14:47 GMT UK time
 
nice :)
 
8:47AM!
 
2:47 PM
morning JL
 
@JLott there's nothing inr=teresting on this day
 
read some manga with some coffee to kick start you day @JLott
 
@tranceporter how can I use the NETWORK_SERVICE account for use with this query: GRANT SUBSCRIBE QUERY NOTIFICATIONS TO NETWORK_SERVICE;
 
I would use network service
 
@jim and why not?
 
2:48 PM
since those are the credentials your app pool uses under IIS
 
no "_"??
 
for asp.net website
 
@tranceporter I just ate some cake so I got that going for me.
 
cakes would do as well. lol
 
but how can I use it in the query? It gives me the following error when I run this: GRANT SUBSCRIBE QUERY NOTIFICATIONS TO NETWORK_SERVICE;
 
2:49 PM
was it a black forest gateaux ?
 
Msg 15151, Level 16, State 1, Line 6
Cannot find the user 'NETWORK_SERVICE', because it does not exist or you do not have permission.
 
lol wait
 
the only users I got are dbo, guest, INFORMATION_SCHEMA and sys
on that database
 
are you using iis 6 or 7?
 
it's not an ASP.NET Website
it's a C# WinForms application
 
2:50 PM
I have to present Xamarin today... sighhh
 
so no IIS is involved
 
Anyone that knows a good pdf book for c#?
 
@Loko google
 
@JLott that's a bad thing?
 
@JLott my xamarin license is due to expire soon, to renew or not to renew... that is the question :P
 
LOL @RaZor
thats a big piece of info missing haha
 
what do you mean xD? :P
 
i thought it ws web app
 
haha no it ain't sorry for not mentioning it
 
how do yoou connect to sql server?
 
2:53 PM
by using strings
:p
 
@ton.yeung I am talking about it with my old manager
 
no hold on I send you the code
 
lol
i mean windows credentials
or sql authentication *uname/pass)
 
ow that way
Windows credentials
 
in the connection string you will see the required info
 
2:54 PM
I know :p
 
aah, so it's integrated security
 
yep
 
the quickest way to fix this
would be create a user in SQL server. and use that user to connect to sql server
 
playing the drums
 
so put username and password in app.config connection string
 
2:55 PM
@tranceporter I can't use the NETWORK SERVICE account? :/
 
network service is IIS
lol
IIS 6 specifically
IIS7 changed that to ApplicationPoolIdentity
 
of course..
 
@RaZor I meant if someone has any experience with a C# book
 
thats why i said i was missing a big chunk of info lol
 
@RaZor that someone could recommend
 
2:56 PM
@Loko that's not what you asked but okay, no I don't have any experience with books. I use SO most of the times to figure things out :)
You have specific requirements for the Ebooks?
 
if you create a single account with required permissions on that database in sql server, you can use those credentials in connection string
 
@tranceporter lets me see.. 1 moment
 
otherwise, if you want to use (integrated security) youo will have to add every single user to sql database
lol
 
nah that ain't gonna work
but can I use the BuiltIn users? or any pre configured user with the required rights?
 
@RaZor Just alot of explaining about the basics
 
2:59 PM
@Loko here is a beginners ebook. It ain't much but start with that
and another link
 

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