« first day (836 days earlier)      last day (4112 days later) » 

9:03 AM
@AndréSilva hi
 
@Himanshu hi
 
ill try to post this again, now when there are more ppl in here :-)

I have implemented a mulitple fileupload using javascript and everything worksfine. But when i want to save the names of uploaded files in the database, it seems that it only saves one. My code looks like this and can someone tell me what im doing wrong
HttpFileCollection uploads = HttpContext.Current.Request.Files;
for (int i = 0; i < uploads.Count; i++)
{
string filepath = uploadFile.PostedFile.FileName;
string fileName = Path.GetFileName(uploads[i].FileName);
Im uploading 2 files but only one file name is saved in the database
 
@AndréSilva can u tell me the logic for search bar
 
@Himanshu what kinde og search bar are we talking about?
 
means suppose for hotel booking user enters bra then result should be brazil then some other options with country name containing string bra
 
9:11 AM
It usually uses regexp to match anything with bra and ordering the result set starting by the match in the start..
But, I'm not sure. I usually do that when I have to..
 
actually i have a column in db named citystatecountry which contains city state and country in a single column
 
Select CountriyName from Countries where CountryName Like "textboxSearch.text";
 
now i have to make a search bar which will display result in the form for each string user enters in search bar
 
@Himanshu If u have ur database it should look something like this Select CountriyName from Countries where CountryName Like "textboxSearch.text";
I mean if ur database part is finished
 
it is finished but what i should do on form
 
9:16 AM
html?
 
asp
 
u need to connect to ur database
and u need a textbox and a button
also a gridview to view ur results
 
i want to show results like it is in search bar of hotel booking sites
 
means for every string a user enters it should display search result below it
 
9:18 AM
u want to view ur results inside the search bare?
ahh ok
 
hmm
 
then
I would go for the <ajaxToolkit:AutoCompleteExtender>
this is what i use
u need to import Ajax to ur project first and then use the <ajaxToolkit:AutoCompleteExtender>, it's pretty simple
 
and the same query means like operator
 
they query will be coded in a .asmx file
or class i would say
which u link to ur <ajaxToolkit:AutoCompleteExtender> which is linked to your textbox!
 
i will do it inside class
ok
 
9:22 AM
u have to create a .asmx file
this how min look like:
<ajaxToolkit:AutoCompleteExtender ID="TextBoxSearch_AutoCompleteExtender" runat="server"
ServiceMethod="GetCompletionSearchList" DelimiterCharacters="" Enabled="True"
CompletionInterval="500" CompletionSetCount="15" MinimumPrefixLength="1" ServicePath="WebService1.asmx"
TargetControlID="TextBoxSearch" UseContextKey="True" CompletionListCssClass="autocomplete_completionListElement"
CompletionListItemCssClass="autocomplete_listItem" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem">
 
no idea of .asmx file
 
if u are using visual studio it should be there
Webservice.asmx file
 
ok
 
inside the asmx file u make ur query
 
ok
one more question
like operator only compare from beginning may be or it will search from middle also
 
9:28 AM
yea
like %search%
u search for what ur word contains
 
only problem is the column contains three values city state and country and if user search for country then the string will be in middle so i was confused whether it will give correct result or not
 
@Himanshu you really shouldn't put multiple informations in one column...especially not if each of those informations can be easily split.
 
@ALL Good noon!
 
Himanshu I would change my database table if u have all ur info in one column
 
but somone else has created the table and now i have to work according to that only
good noon @codebrain
@SaiefAl-Faour i cant change the db
 
9:37 AM
good noon himans
 
let me get this right, u are saying u have one column in your database that includes city, name and other info?
 
@Himanshu you should really high-five that guy. With a chair. In the face.
 
G'morning lads
 
repeatedly
morning @Stripps
 
Why does my TextBox not have any KeyUp-event? :o
 
9:40 AM
ya a single column containg four info seperated with comma like country,state,city,area
 
@Stripps FY..morning
 
that's...wow...I wonder what stuff you've to take to come up with something that stupid @Himanshu
 
lol @Steffen
 
Oh seems like the KeyEvent's something special for Winforms and not webforms
 
@SteffenWinkler but i have to do that and the way he expects
 
9:43 AM
Welcome @Action
 
@Himanshu you should really talk to that guy. You could explain to him how that will literally kill the performance of your database, which will result in people hating your program because it's so slow which will lead to someone ask why it is so slow which will result in him being fired because it was his decision to fuck up the database.
 
@SteffenWinkler +1
 
:)
 
also just to cover your ass, make sure you've his decision written up, at least as an email. Because he might claim it was your idea to do that.
 
Steffen gonna high-five everybody with a barbell i guess
 
9:45 AM
Himashu starting over will save you time and makes ur program look good
 
@codebrain I guess my Kettlebell might work as good :p
 
I knew it , I thought you promoted yourself to Barbells
 
shit man he was standing behind me
 
well...I don't know if I should laugh or pity you. @Himanshu
 
LMFAO
 
9:48 AM
dude, put your ass back on.
 
Seems like a textbox has some sort of "submit-using-enter"-function built in. But how do I capture the event? :o
 
o_O??
 
Morning @AndréSilva
 
:O
 
@Stripps not through key press ? with ascii code ?
Enter has key value = 13.
 
9:52 AM
yeah, but how do I capture the event
dont think text-changed captures enter
I dont think ontextchange fires when pressing enter
 
did you check this ?
 
I just keep getting WPF-results when googling
I tried adding a form around the textbox aswell, but then other stuff on the page gets f-ed upp
up*
 
what did you google to get that? :O
i guess I could make the button hidden and still use it as a submit-thingy?
 
@Stripps , lol why dont you use <input> ??
 
9:57 AM
<asp:input> or just plain <input> ?
 
was that link useful ? you cant use <asp:input> , just <input>
<input> is an html control ..you dont have one in <asp> Tagprefix
 
yeah saw that
A page can have only one server-side Form tag.
darn
 
can someone tell me why this code uploads the mulitple files i have but only updates the database with one file only?

HttpFileCollection uploads = HttpContext.Current.Request.Files;
for (int i = 0; i < uploads.Count; i++)
{
string filepath = uploadFile.PostedFile.FileName;
string fname = Path.GetFileName(uploads[i].FileName);

try
{
string fileSavePath = Server.MapPath("") + "\\Wordfiles\\" + fname + ".upl";
uploads[i].SaveAs(fileSavePath);

file.Context = Path.GetFileNameWithoutExtension(uploadFile.PostedFile.FileName);
 
@SaiefAl-Faour have you checked what uploads.count is?
 
nope I can do that now, when i debug it, it uploads all the files i have. But only updates the database with first or latest file and not all of the uploaded files
 
10:07 AM
@Stripps strange.. i am not knowing what your issue is , if you still want to fire that ..Check wth ClientID , ClientIDMode of those controls
 
The issue is that I want a textbox, when you press enter after you've written something in it, I want to get that string and use it. (like a searchfield), but I've already got a form in the page, so I cannot create another form aswell.
 
stripps
u can use a session or a querystring?
for ur issue
 
Why does the class inheriting IEnumerator<T> doesn't allow to implement IEnumerator<T>.Current? Rather it just implements IEnumerator.Current (as IEnumerable implements IEnumerable)? Any idea??
 
@Stripps this works in my page
<asp:panel ID="Panel1" defaultbutton="button2" runat="server">
<asp:textbox id="textbox3" runat="server"/>
<asp:button id="button2" runat="server" OnClick="btn_clicked"/>
</asp:panel>
 
can anyone tell me plz
 
10:22 AM
hello to all :D
Could someone help me with a little regex?
 
I dont remember ny regex , hope nobody does! Google it C
 
yeah that works for me as well @codebrain, but the panel does not fit in the header-menu :/ maybe I could resize it tho :)
 
@codebrain mhm.. I cant find it in google..
 
yeah dump it in your stripps .. get some css tips fr it!
ok..tell me C
 
I think its really easy. I try to split a string with character groups like: "uuukkkoooo"
the result should be: [] = {uuu,kkk,oooo}
 
10:27 AM
y do u want to do it in regex !?
 
better solution?
 
doing it in javascript or jquery ?
 
C#
 
thanks. I give it a try
 
10:31 AM
lol..try String.split() method if you are sure about c# , it ll reduce the overheads
 
yes. but you can not do this with a pattern like string.
 
I don't get why you would want to group your string by identical characters...
 
every character has a diffrent meaning.
 
I cant you help you since i dont know what exactly you wanna do !
@ALL any interesting topics in c# to share today ?? @Stripps , @Steffen ..??
I found indexer is an good topic ..goin through it..
@C :  static void Main()
    {
	string value = "cat\r\ndog\r\nanimal\r\nperson";
	//
	// Split the string on line breaks.
	// ... The return value from Split is a string[] array.
	//
	string[] lines = Regex.Split(value, "\r\n");

	foreach (string line in lines)
	{
	    Console.WriteLine(line);
	}
    }
 
:-)
 
10:46 AM
I wish I knew how to post \u202e stuff. :(
Good words says that U+202e works, but I doubt it. :(
 
I wish Jon Skeet would get in here to talk Google.
 
Hilll
Can Any one help me with my code, for printing document?
Here is my problem....
http://stackoverflow.com/questions/14578005/document-printing-not-give-proper-output
 
11:21 AM
Morning!
 
@WileyMarques Bom dia
 
@AndréSilva Opa!
 
@Wiley morning
 
11:50 AM
@Ellie , accidentally found your Clinton comparison towards V :-P
Whats the difference between dictionary and Hashtable in collections ?
 
Eve
Hashtable doesn't map anything to anything. Offers just fast lookups.
 
ok thanks...so dictionary maps ?
 
Eve
Yeah, maps keys to values.
 
Yep :-)
What are you up to @Eve ? starting to work ?
 
Eve
No, just chilling.
 
11:57 AM
:-)
25. What is cloning?                                                                                                         Assigning one reference variable to another simply creates a second reference to the same object. To make a second copy of an object, one needs some mechanism to create a new instance of the same class and initialize it based on the state of the original object. The Object.MemberwiseClone method does exactly that; however, it is not a public method. Rather, objects that wish to support cloning typically implement the System.ICloneable interface, which has one method, 
interesting?
 
nope @codebrain
 
lol..@Cylen ..where have you been ?
 
working
it feels weird
need to stop it
 
lol..Jamie is dead
??
 
dunno, havent seen the news
 
12:12 PM
Work overflow ?
I just found a interesting pdf and i was sharing few points nobody bothered to reply :-P :-((
tell me some tips i should know before investing in stocks
 
understand what your edge is
the prices are for tomorrow, what do you know that the market doesnt
and what can you do, that the market cant
having $10,000 can be better than $500m
 
!?
 
since you cant put $500m into small opportunities with big profits
it just doesnt fit
 
yeah..!
 
expose yourself to a limited downside and an unlimited upside
 
12:18 PM
whats downside?
 
and trade on logic, no emotions
maximum possible loss
should be finite
 
No emotions , yes i dont..
 
and known
an example of this is mining stocks
they are at record highs, and most of the world is in a massive recession, china eats 80% of the worlds iron ore
 
yeah..I am thinking to invest small amouts on legendary companies ..steel , medicine , electicals ..etc..?
 
how old are you?
and what is your attitude towards risk
 
12:20 PM
23
 
do you have any financial dependents
 
I always have prior plans on risk and loss..
 
dont invest in what you dont understand
 
hi all
 
I do have good financial dependence..but i wanna invest my earnings ..not willing to touch big savings ..
 
12:21 PM
dont invest in something you read about in the news
 
I have a issue with BI SSAS
 
There is a problem comin with Hi :-P
 
Hey Guys
 
and dont invest in large cap stocks that pay dividends, they are overpriced
 
can anyone help me out on this
 
12:21 PM
do invest in companies that generate cash,
do invest in companies that have founders involved in them
 
@cylen then where can i invest it..i read news and watch market news everyday
 
and do invest in companies that provide a needed service that is hard to replace
 
thats a good point
 
once you filter that list of companies down
 
yeah ..
 
12:22 PM
look at what people are saying about them
 
oh..!
 
and pick from there.
 
how old are you>
 
if they are at record highs, avoid
 
12:22 PM
if they are at a recent low because of uncertainty, maybe get involved
 
yes , i will
 
the stock market will crash hard this year
 
okay..
 
its massively overpriced
 
how do you say that ..
 
12:23 PM
logic, and where has the money come from
 
and how do u update with market with working all day in Programming?
 
the world has set interest rates to 0%
because i trade with algorithms
we dont use real time news
 
you're a massive market kicker i guess
 
kicker?
 
ok..good one ..! i ll learn from you!!
yes , you r kicking the news updated from markets..lol..i am watching market news all the time
and one more fact , here in india , Market fluctuations are high ..:-(
 
12:25 PM
??
guys pls help me with BI issue
 
No clue neha
 
you have high volatility
 
@Cylen ..they were greatest market tips i never heard in any news
 
india is incredibly corrupt, i would never trade it for a direction
the news you hear
is from people that want to tell it to you
 
yes , if a CEO is suffering from illness his company shares goes hell down
 
12:27 PM
if they want to tell it to you, they make money from it. When you hear people give an opinion, think "what position does this guy hold, which direction will he personally profit from, and which will cause him money"
so we're hearing from bankers, the worst is over, yea because they are still horribly exposed to bad debts
if peoples house prices dropped 10% the banks would be farked
 
oh..!
hmmm..
 
its like people pleading not guilty when they are looking at the death penatly
i mean, duh?
 
so i should work on algorithms and logics ! technically a lot to do..
yep..
 
you dont have an edge over me
i trade with that, my software licenses for my PC are $20,000 a month
 
yes i got it..its just += to what i am already doing
 
12:29 PM
you cant compete with that
 
surely i cant ..i knew it
 
build your own models for understanding a fair price for an instrument, test it on data you see
if it works, use it to predict future prices for many equities, and then find the top 10 misprices (differences by %)
and invest in them all, on a diverse portfolio.
 
oh ..
hmm.. i ll start it ..!
Commodity ?
gold n silver , copper /??
 
gold isnt a commodity, its a currency
its not used for anything
it was originally created because it was impossible to fraud
 
hmm..! here we trade gold n silver under precious metals ..
 
12:32 PM
yes technically it is
but it doesnt behave that way
there is no demand for it, its not used, its bought and put in a vault
 
hmmm...I am not interested in it..
yeah..
 
avoid it, commodities, find ones that cant be replaced, e.g. through addiction
or tradition (coffee)
or required food
understand what countries consume what commodities,
 
lol..yeah coffee , food..MC'D..
 
and where it comes from, look at trade tariffs, the EU is killing the price of sugar
 
hmm..
 
12:34 PM
then make a prediction of what will happen to the countries that consume it
so japan, population = constant/decline. Demand will not increase
 
price of everything is goin high here day by day
 
now repeat that sentence logically, using words like demand, supply and opportunity cost
use onions as an example
 
can you tell me some 3 companies that exists world wide and you have stocks with?
onion is in demand in india ..everyday recipes contains onion , garlic
 
anyone familiar with forms and tab controls that can help me ?
 
i trade, not invest.
but SBM Offshore
has a good upside potential
 
12:37 PM
okayy..!
SBM ?
 
it missed a dividend, causing a massive sell off, and had a write down X2 recently
but its results are very similar, its doing fine, but price is 1/3 of what it was a year ago.
its oil, so demand is good,
and if it resumes paying a dividend
its price will go through the ceiling
 
you're a good one in markets ..how come?
 
for it to go down, it needs massive delays on its current projects, which i cant see happening, they're a european company with regulated workers and reporting
 
how old are you and what did you study !?
 
because logic, im 27 and i did physics
 
12:39 PM
lol..yeah !
Thanks a lot mate ! i knew you were good , you're really one..
 
i cant stress the importance of finding your own conclusions
plus you need to hedge your currency exposure,
no point making euros if you're spending in £
what dividend taxes will you pay?
 
lol..yeah ..
 
etc.
 
nothing im payin yet..
 
be informed, spend a year building a model, doing some electronic trading models (etrade etc.)
and be really brutal
 
12:42 PM
My currency has low value comparing $ ,E, L..
yes, thats a must case
but brutal to whom ?
 
your own model
dont want it to work
want it to fail
find everything wrong with it, if something goes right, assume it was an accident
 
yeah ..no dilemma
 
if i were you, esp as you're so young
i'd use some models using background data
 
background data of companies ?
 
to build a prediction for 20 stocks, and 20 commodities
yea, price vs market share vs demand (for commodities)
 
12:45 PM
oh..i ll start a testing model
 
add in currency inflaiton
 
hmmm..
 
test it for a year, keep track of your profits and losses
 
this s a good one
 
and if its good, trade it in small amounts
if its rubbish, build another one
oh and avoid property companies
 
12:46 PM
so , for each company i must have a model!
 
they're going down hard....
 
Real estates right??
 
yup
 
yeah ..found DLF is goin real hard too
 
Anyone uses junnark AspxFormGen 4.0 ?
 
12:48 PM
no @Andre
 
:((
Thanks a lot again @Cylen
 
np
 
hope your relieved from your work stress now !
and i got a lot of good tips !
 
Hi guys :) I'm new to MVC I was wondering if anyone was familiar with EF Linq?
 
1:01 PM
@all bye..
gut nacht
 
hey, quick question: I know that there are two ways to add a variable in a string. The first would be: "example string " + exampleVar +" second part of example string"; but what's the second way? I know that you only add some sort of place holder to the string...but what? And where does the variable go?
 
use string builder
for efficient string functions
("hi this is {0} ", myname);
 
no need for that, I hope. I've a string that is translated and in there is a variable that I need to place there. Of course I could do some sort of String.Replace() but I know there is that 'real' place holder
 
string myname="sakthivel"
 
@codebrain yes, that's exactly what I searched
thanks!
 
1:03 PM
lol..dont work too much @Steffen , you tend to forget things easily!
welcome
@Steffen are you looking for an good tip on strings ?
 
@codebrain what do you mean I forget things too easily? (I do, as a matter of fact). I always look for good ideas :p
 
Check out String intern , String interned , Secure strings
may be you knew these already , just i just came across these topics recently!
@Steffen ^^
@All Cya bye
 
@codebrain okay, I read the msdn page about string intern now three times. I don't get what the benefit is. I only see disadvantages. It consumes RAM (memory leak), it consumes CPU (because it always first has to look through it's intern structure before creating a new string) and it's a security risk because passwords and usernames can easily be read from RAM
I just wanted to ask what idiot would build something like that, then I remembered that those are the same people that came up with the GarbageCollector...that piece of shit.
 
hey is the database guys here
@Kayra im learning EF too but im doing codefirst
 
1:57 PM
you're better off just using "example string " + exampleVar +" second part of example string"
That's both faster and less error prone than a StringBuilder. You *could* use string.Format, though that's even slower, and IMNSHO even more error prone. I don't see the point in using a slow, run-time, type-unchecked placeholder, when we have these other placeholders called "variables" :-). Use those.
 
thats exactly the opposite of what MS and many other devs advise.
 
Having said that, if you have only 1 or maybe 2 replacements to make, then the string.Format technique isn't too unreadable.
Well, even MS admits plain concat is faster
 
Is there any way to dock anchor a frame inside a frame ? I have tried this form.Anchor = (AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left);
form.Dock = DockStyle.Fill;

And bothy not working
 
and honestly, I've never seen a reason to prefer string.Format... have you?
 
"It consumes RAM" well so does most things. "It has to look through it's intern structure" only on build. If you have plain text passwords in RAM you're the security risk
 

« first day (836 days earlier)      last day (4112 days later) »