« first day (2292 days earlier)      last day (2639 days later) » 

12:00 AM
@KendallFrey i can see your facepalm .. its the only way i can think of. what else can i do ?
 
@ItayZaguri How would removing Vehicle help that?
 
@KendallFrey removing Vehicle from being an Abstract class
not at all
 
@TravisJ In this example, I should have | Add and Grey Checkmark in front of Referral. Because inside Referral Table there is no record for MemberId.
 
Still, how would that help?
 
12:01 AM
when the lecturer says "without modifying the system" what does he mean?
no code changes?
 
so i can make a tractor which is not A car\bike\truck
but still a vehicle
 
because your method sounds fine. abstract base class, add a new child class for each vehicle type
 
You don't need to make Vehicle non-abstract
 
@hsimah yes
 
You didn't need to do it for Truck
You don't need to do it for Tractor
 
12:03 AM
yeah but a Truck has it own attributes
a tractor is not a part of my assignment
 
Why should Truck be any different in concept than Tractor?
 
because i was asked to actually create a Truck class with specific attributes attached to it
 
so do it
 
tractor is an example my lecturer gave in order to say "i want to add a tractor vehicle and still to not see any code changes"
 
without seeing the exact assignment criteria, you do sound like you are on the right track.
 
12:05 AM
so do it you mean do what ?
 
@ItayZaguri Do you think he meant not writing any new code? Because that's impossible.
 
should this be code or configuration? do you have a database where you store vehicle types?
becuase if it is code, you add a new class called Truck, inherit Vehicle and implement all abstract properties/methods
 
@KendallFrey aside of adding a New object of course
 
I think you have the wrong idea of what you're supposed to do
 
@hsimah a code .. and i did that
 
12:08 AM
Yeah either the vehicle definitions are string only, or you must add code to have a tractor.
Will code for tractor.
 
@TravisJ the problem is here:
@foreach (var referral in Model.Referral.Where(x => x.MemberId.ElementAtOrDefault(i).ToString().Contains(members.MemberId.ElementAtOrDefault(i).ToString())))

Because there is no returned item in referral to compare MemberId !
 
I am not sure I can help you, as the issue seems to be based in business logic and not syntax or composition. Perhaps if you make a simpler version of your situation it will help you solve your problem.
 
@KendallFrey what could be wrong ? in the assignment he says "each Vehicle has X,Y,Z attributes.." then "A car should have the same attributes as a Vehicle + A,B" same with a Bike and a tractor
 
@ItayZaguri buddy it sounds like you have done what you were asked. You created a new class called Truck. If this is a uni course or something I would suggest going and asking a tutor for clarification.
 
same with Bike and tractor but different attributes among them all
 
12:11 AM
You created the concept of a Vehicle. You created the concept of a Car. You created the concept of a Bike. You created the concept of a Truck. Now create the concept of a Tractor.
 
@KendallFrey but i was not asked to create a tractor thats the point
 
But you were asked to create a system that you could
And creating a tractor isn't fundamentally different than creating a bike
 
@KendallFrey he said "the system should be so solid so if i want to add a new car tractor,bicycle or whatever.. there won't be any code change"
 
You created a bike
So you should just as easily be able to create a tractor
 
mate, you can't do it without a code change
you have to add a new class
 
12:14 AM
so i create a tractor class .. then he will tell me "i want to add a train but i must make code changes in order to do so"
 
then you create a Train class
 
lol
 
Is there a simpler way of blocking a thread via one function call, and unblocking from another? I feel like I'm using ManualResetEvent wrongly.

this.manualResetEvent.WaitOne();
this.manualResetEvent.Reset();
 
the point is that he kind of wants me to make it be able to accept any kind of vehicle without code change
 
as I see it you have two options: data or code. You could create a Vehicle class which maps to a database schema. Users create their vehicle types via a win form or web application and they are saved. OR you create a class for each vehicle type and inherit from the Vehicle class
as I said earlier, you might wanna clarify with the lecturer. You appear to understand what you need to do, but the question is unclear and we can't help with that
 
12:17 AM
@jhmckimm That doesn't look inherently wrong
 
your Vehicle base class and Bike, Car, Truck child classes is how I would do it if it was my task
 
i'm just thinking whether there's an approach i haven't encountered yet which can help me
 
@KendallFrey It's just bothersome that I have two method calls. I'm locking for something like... threadBlocker.Block() // blocks current thread, and something called from another thread like: threadBlocker.Unblock()... if that makes any sense?
 
@jhmckimm That's exactly what MRE is supposed to do
 
@hsimah and Vehicle non abstract ?
 
12:19 AM
There is a variation called AutoResetEvent that calls reset automatically
 
That'll be what I'm looking for then.
 
I hear it may have performance issues though, so use with caution
 
O RLY?
It's just for starting/stopping another thread that processes a list of Actions.
 
@ItayZaguri it depends what needs to be in the base class. but abstract should be fine. I'd have properties like Wheels, Engine, Seats etc. Those are all overridden in the child classes
 
12:21 AM
i.e. that thread blocks if there are no actions, and MRE.Set(); is called if an Action is added to the Queue.
 
I have a feeling you want something even higher level, but I can't say unless you explain more
ah yes
sounds like you want BlockingCollection
 
@hsimah I would agreed with you anytime. but for this particular task ? so i can make a new Vehicle Tractor for Example
 
@KendallFrey My current prototype/blueprint: pastebin.com/NBg0ATLx
 
@ItayZaguri yes for this particular class man
 
@jhmckimm I did something exactly like that with BlockingCollection
Inheriting from ThreadBase looks very concerning
 
12:27 AM
That's a custom class called ThreadBase.
 
Yeah, didn't realize that it was a thing in C#.
 
Hi, um am I allowed to ask a question on how something works here?
 
It's just a wrapper around a Thread, really. Just some custom methods to provide safe control over it.
 
@Link sure
Those are my favourite kind of questions
 
12:29 AM
I'll give BlockingCollection a whirl. Thanks for your assistance. :)
 
@hsimah so it takes me to my first question: How can i make a Tractor then ?
 
@ItayZaguri The same way you made a Truck
 
Well seems so, I'm adapting this code: https://msdn.microsoft.com/en-us/library/system.windows.forms.controlpaint.drawreversibleframe(v=vs.110).aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-2

And I was wondering, for the MouseDown Handler, to me it appears that this works on form load when I click the mouse button. My question is: How would I go about adapting this with a button control, so I can click button, then select the region. My concern is if I put it in a button_click() function it'll get the starting point from that button click instead of somewhere else. Is that a valid conce
 
@KendallFrey no man. because a Truck is a part of the system, i already created a Truck. once i finish my system i don't want any code changes and creating a tractor class should be so
would be so *
 
25 mins ago, by Kendall Frey
I think you have the wrong idea of what you're supposed to do
 
12:34 AM
perhaps, but according to the instructions i think i have done fine
 
@Link I think what you're trying to do is select an area and push a button to modify it (or vice versa). So you basically need to manage the state of the system, as in, what operation is currently in progress.
 
@KendallFrey What I'm trying to do is be able to push a button, then select an area
 
whatever you want
You just need to know what you're doing at any moment, even in between events
 
@hsimah thanks for your time man, but i know how to do that. i just dont think this is what he meant
 
12:39 AM
@KendallFrey So basically, what I don't get is, how would I involve the button in this and then do I wait for mouse down? or is the click itself a mouse down event?
 
a Tractor shouldn't be a prepared class @hsimah
 
@ItayZaguri are you creating databases and a front end for this?
 
mousedown is fired when the mouse button is pressed down
 
@hsimah no, this is a c# .NET 2 course only
 
@ItayZaguri What makes you think that? That sounds absurd
 
12:41 AM
@KendallFrey because he noted that at the end of the task instructions saying "make the system solid so any other type of vehicle which is not a Car\Bike\Truck could be added without any code change"
 
@ItayZaguri then this is how you do it
 
besides Adding new object and only this .. he actually wrote that too
 
@ItayZaguri That makes me think that nothing different would be done, just adding a new class
 
@ItayZaguri he wrote you cannot make a new object?
 
@hsimah he wrote adding a new Object is the ONLY thing i can do
besides that everything else should be built-in
 
12:43 AM
@ItayZaguri buddy, that IS what I did
my Tractor class is a new object
 
adding a new OBJECT not class
 
an object is a class
 
@hsimah when he says no code changes he means making a new class also
 
Hi guys, I know it's a bit strange to ask it here, but is here anyone that can help me out with C/Arduino?
There is a strange thing going on with my code, but I can't tell what it the problem is..
There is nobody active in the C chat so :(
 
@ItayZaguri then you cannot create a new object type of Tractor. The only thing I could think of would be to change Vehicle from being abstract and add a constructor. Then something like Vehicle tractor = new Vehicle(Name = "Tractor", Seats = 1, Doors = 1);
 
12:51 AM
@hsimah he actually highlighted it "NO CODE CHANGES BESIDES THE 'NEW' OBJECT "
 
so you are not to make a new type, all your types would be Vehicle and just have different properties I guess
 
@hsimah thats some kind of a relief, because i was sure i was missing something big and stuff like that . knowing that making Vehicle non abstract is the only solution made me feel better haha
@hsimah i sent him an Email anyway to see what he says ... thanks
 
yeah, I guess Vehicle becomes the concrete type. You will need a constructor to build the different vehicle types.
 
@Gigitex Go for it
 
This is the piece of code.
When Im pressing the first button, int A should start with 0.
So the array[a] should also start with 0.
But, the problem is: When im holding the first button for like 2000 ms. It should add 2000 to Duur[a]
But it gives int a the value of 2000 instead.
So when Im pressing the second button, it does what it has to do. It just adds one, so it will be 2001.
The problem is with the first buttonclick, every time.
 
1:06 AM
Is it possible that Duur[0] and a are the same location in memory?
One way to check would be to examine Duur[0] after incrementing a
 
I dont know what you mean with the same location in memory
 
Arduino isn't very strict about memory management, and it will overwrite memory when it runs out, rather than throw an out of memory exception.
 
so you are saying that im using A somewhere else?
 
@Gigitex a is a variable, right? It's stored in memory. So is Duur. It's not impossible for them to be stored in the same place
@Gigitex I'm saying I don't know what the problem is
 
ah
:P
uh
Damn, how do I change the memory places then?
 
1:09 AM
You don't
First figure out what the problem is before trying to solve it
 
that's what im trying
to figure out the problem
 
Slightly related: What does the arduino compiler report as the amount of memory available for local variables?
 
@KendallFrey can you tell my girlfriend that? she's a wordpress developer and refuses to debug things, just tries random fixes until something works.
 
@hsimah Sure, bring here here and I'll be happy to crush her soul
 
with the setup im telling A to be 0. So Duur[a] should be Duur[0]. But the variable that should be stored in Duur[0] tells A what to be.
Dont know if you understand my cracky english
 
1:12 AM
brb
 
wait
*Fluffy
Because Duur[] is an unsigned long, it gives A a new variable.
Instead of taking the variable of A
nvm, int duur[] does the same.
 
It's nearly lunchtime on Tuesday but
 
it's 2:24 midnight here..
as you can see: debugging.
At first A = 0, after Duur[a] A gets the value that should be stored in the array...
 
1:33 AM
west coast US here...
 
The Netherlands here
 
hooray for stock vesting
 
@Gigitex That pretty much proves my hypothesis false, but perhaps ToonHoogte[0] is the same as a.
It's really really hard to debug code that I can't see
 
Well the problem is that im not assigning any information to both arrays in the setup.
But ToonHoogte is doing good, and Duur not.
When Im giving Duur[0] a value in the setup, it works.
well i can zip my file and send it to you?
or upload it somewhere
 
Feel free to paste it into a gist
Also, log the value of a after every line, to help narrow it down
 
1:46 AM
making an account on github, wait a sec
 
Now that's something you don't hear from a developer often
 
oke dont understanding that
what did you mean with Gist
when im googling gist im getting github
:(
 
gist.github.com
 
ah something like pastebin
just added the necessary files
 
2:03 AM
@Gigitex There's definitely something wrong with your memory management there, but I don't know exactly what's going on. Your arrays are only defined to be one element long, so anything after the first press is very likely to cause something to go wrong, since you're writing to memory outside the arrays.
 
Yes I thought so, because when im giving my array a maximum of 7
it works.
when im not giving a maximum, it doesnt
 
ah, so that's definitely related
 
Ill tell my teacher that
And just give the array a max of 7
thanks for your help :)
Do you even know what it's supposed to be? Because the comments are in dutch
 
I gather there's something musical, but I don't know Dutch so I'm pretty lost
 
haha
Well I have 7 physical buttons, Each button has a different note.
With the potentiometer you can change the notes for the buttons.
When you've pressed the record button, Arduino will remember each buttonclick with it's duration and note, after you're done it will repeat you
And I've also a c# application where you can play premade songs and play virtual piano :)
 
2:08 AM
That's cool
 
I like arduino more then c# :S
Maybe just because it's physical
 
I think my very first C# program was one that played music based on notes you typed in
 
haha nice
mine was uhh
 
I can still remember the tune I made with it
 
Hello World
 
2:09 AM
It was awful
 
hahaha
I made Furelise and Pirates of the carib.
but because I can't read notes, it's awful too.
Some notes are too high or too low.
 
My approach to music is very different than most people's
I'm very unartistic and algorithmic
You may like what I made using Arduino though
It doesn't handle the music though
 
wow
that's awesome!!!
But you made the lights yourself right?
It doesnt get higher because the music is getting louder or something?
it gets higher because you told him so
am i right?
 
@Gigitex If you mean the physical lights, I bought them as a strip. If you mean the animation, I programmed that too. It's not automatically generated from the music.
 
I meant the animation yes
Nice!
But If im remembering it right
 
2:19 AM
My estimate is 20 hours to animate that
 
The strips should be programmed by 3 leds or something?
 
it was a bit of a bitch
 
it is not possible to be generated from the music right?
or maybe it is
with a sound shield
or something
vibration shield
 
It is possible, but it limits you
 
ah
 
2:20 AM
It's much more effective to design creative animations yourself
 
it's cooler
:P
gotta try that once
 
There are plenty of projects that flash lights to the beat or something
 
It's an awesome thing to share on youtube
 
I've only seen one or two similar to mine
 
:o
 
2:21 AM
@Gigitex Apparently so, it's my most viewed video by a landslide
 
nice haha
 
Annoyingly, I get comments of people saying "plz send teh codez"
One today, even
> how instal/run code at PC???
I should hook up the arduino again and watch it
It's much better in person :P
 
:P
 
Have you ever seen Christmas light shows with music?
 
nop
 
2:28 AM
I've seen this one in person a couple times
This guy is crazy
 
wow damn
'i hope it's not with arduino
XD
 
A single arduino couldn't power that
I reckon it's something similar but much more powerful
for details
 
damn
pff now im having another problem
damn it arduino
I have a for loop, which has to start with 7 ( a = 7)
so if I do:
tone (speaker, Tone[a], Duration[a]);
it doesnt take tone[7] but tone[3]
...
memore space again?
 
maybe?
By Tone do you mean ToonHoogte?
 
yes
 
2:38 AM
How do you define it?
 
void play()
{
  for (int b = 0; b <= a; b++)
  {
    Serial.println("aplay");
    Serial.println(a);
    Serial.println("bplay");
    Serial.println(b);
    Serial.println("Toonhoogteplay");
    Serial.println(ToonHoogte[b]);
   // Serial.println("Duurplay");
  //  Serial.println(Duur[b]);
  //  tone (speaker, ToonHoogte[b],Duur[b]);
  //  delay(Duur[b]);
  }
}
 
No, I mean Tone
 
so now it's something different
Tone?
oh with the setup
 
Or ToonHoogte
 
int ToonHoogte[] = {};

unsigned long Duur[7] = {0,0,0,0,0,0,0};
think the same problem?
 
2:41 AM
yes
 
need to make that like duur
aha
 
there aren't 8 elements in it
there are 0
 
8?
 
That's what you need to be able to use ToonHoogte[7] with any confidence
 
wait
if i say toonhoogte[7]
it will have 7 elements right?
not 8?
or does it count also count from 0 to 7
 
2:42 AM
That will get the 8th element
zero-indexing
 
damn
so if I want to add 7 elements
 
You can't add elements to an array in C
 
it should be Toonhoogte[6]
 
arrays always have a fixed size
 
Yes but
Let's say i want to store 6 int's
Do i need array[6] or array[5]?
 
2:44 AM
array[6]
 
oh then im good ;p
 
that will contain indexes 0 to 5
 
Thought that i was wrong there
can i tell an int not to be bigger then 7?
 
not as part of a data type
 
so with a if-statement
 
2:47 AM
Yes, that will work fine
 
right now im mindfucked
I have 7 buttons.
Each button has to store something in the array
What maximum size does A need?
i can't think normally anymore...
a bit sleepy
 
7, I guess
 
ye because if im doing 6
it doesnt store the 7th
but when Im gonna use A in a for loop
nvm i will just try it
 
Go forth and make something awesome
I'm going to go forth and get some sleep
cheers
 
thanks for your help!
 
 
2 hours later…
5:03 AM
Hi
For web environment, running the SecuSearch engine in IIS, you should specify additional user or group
settings for “Lock pages in memory” as shown above. Also, for Windows 7, the IIS_IUSRS group is required;
for Windows 2003, IIS_WPG is required.
How can I do this ?
 
6:02 AM
@SagorAhmed are you here?
 
Yes
@juanvan
 
Did you figure out how to add the IIS_IUSER to the folder
 
No
I have come to know that visual studio comes with default IIS server
How can I add IIS_IUSER to that server ?
 
You are trying to debug the project?
When you debug, IIS Runs under the current user
 
6:18 AM
Yes I am trying to debug the project .
But I am getting this error .
ERROR: Application_Start: SSAPP_Initialize: 601 / You need to restart the application pool (or IIS) before retry.
To remove this error I need to do the following :
For web environment, running the SecuSearch engine in IIS, you should specify additional user or group
settings for “Lock pages in memory” as shown above. Also, for Windows 7, the IIS_IUSRS group is required;
for Windows 2003, IIS_WPG is required.
How can I do this ?
 
Do you know what folder the User has to be added to?
Control Panel -> Administrative Tools -> Local Security Policy
You will find the folder User Rights under Local Policies
Then find that Lock Pages in Memory, open it and add the IIS User
 
6:40 AM
Guys
I'm trying to import C++ dll into C# project
but it throws me an exception said : "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"
but failed
I've tried to run the application in 32-bit mode
can anyone help me please ?
 
where I have to add IIS user ?
@juanvan
 
6:57 AM
Anyone here to help with a problem? It's a very simple problem but for some reason I can't figure it out
 
What's your problem @DestinyFaith
 
@Redplane I'm trying to calculate a random longitude between two longitudes. I tried using degrees, minutes and seconds but it's not within the requested area.
I may of found a solution
 
Do you mean about a random coordinate between 4 points ?
I mean polygon
 
I mean, that was the goal in the long run.
No, the main goal is trying to find a random coordinate within a square
But I'm having very little luck
 
random (min x, max x)
random (min y, max y)
 
7:07 AM
That only works for ints.
 
yes
what's your data ?
 
Coordinates, like real life latitude and longitudes
I'm trying this solution now
10
Q: C# Random of cordinates is linear

Shawn McleanMy code is to generate random cordinates of lat and long within a bound: Random lastLat = new Random(); Random lastLon = new Random(); for (int i = 0; i < 50; i++) { int lat = lastLat.Next(516400146, 630304598); //18.51640014679267 - 18.6303045981929...

Not sure if that'll really help
 
as my current knowledge
lat from -90 to 90
long from -180 to 180
 
yeah, but to make it even close to accurate there are a ton of decimals
 
for a random polygon
its complicated
but if you just want to get a random point in a square
just take a random number from min x -> max x
min y -> max y
 
7:22 AM
Yo.
 
Ok got it working
 
yo again
 
yo, yo and yo again.
 
7:44 AM
ohayou
 
just had an update that took over an hour to install
 
@Proxy yo, yo. *shakes head*. yo.
 
well i was shaking it and observing the police penalizing people for crossing the street on an unmarked place
 

« first day (2292 days earlier)      last day (2639 days later) »