Search Results

Search found 373 results on 15 pages for 'acidzombie24'.

Page 13/15 | < Previous Page | 9 10 11 12 13 14 15  | Next Page >

  • How can i test my TSQL syntax?

    - by acidzombie24
    Quick question: How do i get some kind of database to use to test my sql syntax and create basic data. I have Sqlite Code which i'll soon put on a server. I have sql server 2008 installed with visual studio 2010. I tried connecting to the database and had no luck. I also tried using a .mdf file instead thinking its a file and i wont have connectivity issues. Wrong, i still couldnt connect and i used this site to help me (i'm aware its 2005) In that case i used var conn = new SqlConnection(@"Server=.\SQLExpress;AttachDbFilename=C:\dev\src\test\SQL_DB_VS_Test\test.mdf;Database=dbo;Trusted_Connection=Yes;"); exception Unable to open the physical file "C:\dev\src\test\SQL_DB_VS_Test\test.mdf". Operating system error 5: "5(Access is denied.)". Cannot attach the file 'C:\dev\src\test\SQL_DB_VS_Test\test.mdf' as database 'dbo'. with trusted = no i get Login failed for user ''. (What user am i suppose to set...). I created the .mdf with visual studio somehow.

    Read the article

  • computational puzzles (brute force)

    - by acidzombie24
    Not that i need it but it was interesting to hear someone speak about their server and protecting it from DOS attack by having a puzzle that the client must solve before the server will do anything (it doesnt do allocations or make a session unless solved). The person also said puzzles can be made to take a quick amount of time or long. And they are easy to check if it is solve correctly but difficult to solve. What are these puzzles? I never heard of one. Can someone give an example (link?)

    Read the article

  • What is the difference between panic and an assert?

    - by acidzombie24
    Go doesn't provide assertions. They are undeniably convenient, but our experience has been that programmers use them as a crutch to avoid thinking about proper error handling and reporting. However it has print and println which does panic like print, aborts execution after printing panicln like println, aborts execution after printing Isnt that the same thing as an assert? Why would they claim the above but have panic? i can see it leading to the same problems but adding an error msg to the end of it which can easily be abused. Am i missing something?

    Read the article

  • How do i make a copy of an object? Javascript

    - by acidzombie24
    I have a class in json format. I would like to make two instance. Right now (its pretty obvious why) when i 'make' two objects i really have 2 vars pointing to one. (b.blah = 'z' will make a.blah=='z') How do i make a copy of an object? var template = { blah: 0, init: function (storageObj) { blah = storageObj; return this; //problem here }, func2: function (tagElement) { }, } a = template.init($('form [name=data]').eq(0)); b = template.init($('form [name=data2]').eq(0));

    Read the article

  • relaunch app when it ends or when it prints out certain text (stdout)

    - by acidzombie24
    I have an app which acts almost like a daemon. Sometimes it quits on error and many times it prints an error msg then ask users to press any key to close. How can i relaunch the app when either case happens? I am more interested in the 2nd case. I can do this in c++, C# or python. The script is an old python that i dont want to change (a newer c# version is in the works but not stable)

    Read the article

  • jquery ajax calls with scope safety

    - by acidzombie24
    My gut tells me that if i am on a laggy server and the user fires two events fast enough on the success function c will be the value of the most recent event causing func1 to use the wrong value. <--- This is a guess, i haven't proved it. Its a feeling. How do i ensure that i use the right value when calling func1? I prefer not to send c to the server and i dont know if or how to serialize the data and deserialize it back. How do i make this code safe? $('.blah').click(function (event) { var c = $(this).closest('.comment'); ... $.ajax({ url: "/u", type: "POST", dataType: "json", data: { ... }, success: function (data) { func1(c. data.blah);//here

    Read the article

  • How should i center my page?

    - by acidzombie24
    I have two parts to my site. The main body and the sidebar. The body is 6in and sidebar will probably be 200px. How do i center my page? So there is equal space on the left and right side? It should center no matter the resolution. Using XHTML 1.0 Strict. Should work on all major browsers or at least Firefox and chrome.

    Read the article

  • Why should i POST data rather then GET?

    - by acidzombie24
    I know you dont want to POST a form with a username and password where anyone could use the history to see or situations where repeat actions may not be desired (refreshing a page = adding an item to a cart may not be desired). So i have an understanding when i may want to use one over the other. But i could always have the server redirect the url after a get to get around the cart problem and maybe most of my forms will work perfectly fine with get. WHY should i use POST over get? I dont understand the benefits of one over the other. I do notice post doesnt add data to the history/url and will warn you about refreshing the page but those are the only two differences i know of. Why as a developer might i want to use one over the other?

    Read the article

  • lib to read a DVD FS (data disc)

    - by acidzombie24
    I am thinking i might want to port a lib to read a DVD filesystem. I am not talking about movies but datadisc. Theres existing code for me to do raw reads from the disc. I need code that request this data and allow me to browse files on the disc. What lib can i use for this? -edit- NOTE: I am using an OSless hardware. Ppl seem to miss that but Alnitak caught it and gave me a great answer :)

    Read the article

  • WTF why does this SQL work in VS but not in CODE?

    - by acidzombie24
    The line cmd.ExecuteNonQuery(); cmd.CommandText CREATE TRIGGER subscription_trig_0 ON subscription AFTER INSERT AS UPDATE user_data SET msg_count=msg_count+1 FROM user_data JOIN INSERTED ON user_data.id = INSERTED.recipient; The exception: Incorrect syntax near the keyword 'TRIGGER'. Then using VS 2010, connected to the very same file (a mdf file) i run the query above and i get a success message. WTF!

    Read the article

  • Non intrusive notification without audio?

    - by acidzombie24
    i have a C# app that registers a protocol. When you click BLAH://djfhgjfdghjkd in a browser it launches my app. However you can click multiple links and each link is a note added into the app. How can i inform the user that he did fully click the link? Right now i have a console app showing up for 1sec (basically pops up and goes away as fast as possible) which felt better then a hidden console since you are unsure if it went through. The 1 second takes a lot of time when you are trying to rapidly click many notes/links and the console gets in the way. What can i do that is noticeable? I'm thinking have a box that comes up (and is semi transparent) but the click passes through it. Maybe there is a better way? Also i wouldnt know where to start with transparent windows or pass through clicks

    Read the article

  • Call functions in an event/function chain?

    - by acidzombie24
    I have 3 functions. They can be called in any order (later they may need specific order). The return value of one function should be the first param of the next. How do i do this? what i am thinking is something like the below. Whats the best way to do this? string void fn(string sz, data d, eventhdl nextFunc) { //do stuff if(nextFunc == null) return ret; else return nextFunc(ret, d, nextFunc.Next); }

    Read the article

  • Is it possible to implement events in C++?

    - by acidzombie24
    I wanted to implement a C# event in C++ just to see if i could do it. I got stuck, i know the bottom is wrong but what i realize my biggest problem is... How do i overload the () operator to be whatever is in T in this case int func(float)? I cant? can i? Can i implement a good alternative? #include <deque> using namespace std; typedef int(*MyFunc)(float); template<class T> class MyEvent { deque<T> ls; public: MyEvent& operator +=(T t) { ls.push_back(t); return *this; } }; static int test(float f){return (int)f; } int main(){ MyEvent<MyFunc> e; e += test; }

    Read the article

  • why is this legal, c++ typedef func

    - by acidzombie24
    i did this in msvc 2005. typedef void (*cleanup_t)(); void func(cleanup_t clean) { cleanup_t(); } Why does this compile? and not give me a warning? ok, it gave me a unreferenced formal parameter warning but originally i did this when clean was in a class no there was no unreferenced formal parameter when this code gave me problems. What is cleanup_t(); really doing and what is the point? now for laughs i tried int() and that worked also.

    Read the article

  • How do i force a file to be deleted? Windows server 2008

    - by acidzombie24
    On my site a user may upload a file (pic, zip, audio, video, whatever). He then may decide to replace it with a newer revision. This user may upload a file, make a post then decide to put up a new revision replacing the old (lets say its a large zip or tar.gz file). Theres a good chance people may be downloading it if he sent out an email or even im for the home user. Problem. I need to replace the file and people may be downloading and it may be some minutes before it is deleted. I dont want my code to stall until i cant delete or check every second to see if its unused (especially bad if another user can start and he takes long creating a cycle). How do i delete the file while users are downloading the file? i dont care if they stop i just care that the file can be replaced and new downloads are the new revision.

    Read the article

  • Hotkey (Not Global) WinForm .NET

    - by acidzombie24
    In my winform app i would like one special button to run a test everytime i press it. There are dozens of controls so implementing it in each one takes too much time. Is there a way i can set a hotkey so no matter what i am doing in the app i can press the key and it will fire off my event?

    Read the article

  • How do i make a picturebox selectable?

    - by acidzombie24
    I am making a very basic map editor. I'm halfway through it and one problem i hit is how to delete an object. I would like to press delete but there appears to be no keydown event for pictureboxes and it will seem like i will have it only on my listbox. What is the best solution for deleting an object in my editor?

    Read the article

  • mysqldump problem with case sensitivity? Win->linux

    - by acidzombie24
    When i dump a table with uppercase letters using mysqldump it comes out as lower case in my dump.sql file. I found a report here in 2006, almost 4 years old http://bugs.mysql.com/bug.php?id=19967 A solution here suggest making linux insensitive. I rather not if possible. Whats the easiest way to copy a win32 db into linux?

    Read the article

  • linux+apache+sqlite=death?

    - by acidzombie24
    The title is a joke. However it is serious as far as my app is concerned. I am running apache with mod mono and my asp.net app is using mono sqlite as its db. When i refresh the page twice i get the DB is locked error. The folder it is in is chmod 777. The webapp is creating sqlite.db and sqlite.db-journal but it doesnt seem to be able to delete the journal. i'm confused. What permissions do i need to set these? i tried precreating the files using 777 and had no luck.

    Read the article

  • Why does this SQL work in VS but not in code?

    - by acidzombie24
    The line cmd.ExecuteNonQuery(); cmd.CommandText CREATE TRIGGER subscription_trig_0 ON subscription AFTER INSERT AS UPDATE user_data SET msg_count = msg_count + 1 FROM user_data JOIN INSERTED ON user_data.id = INSERTED.recipient; The exception: Incorrect syntax near the keyword 'TRIGGER'. Then using VS 2010, connected to the very same file (a mdf file) i run the query above and i get a success message.

    Read the article

  • Get Links in class with html agility pack

    - by acidzombie24
    There are a bunch of tr's with the class alt. I want to get all the links (or the first of last) yet i cant figure out how with html agility pack. I tried variants of a but i only get all the links or none. It doesnt seem to only get the one in the node which makes no sense since i am writing n.SelectNodes html.LoadHtml(page); var nS = html.DocumentNode.SelectNodes("//tr[@class='alt']"); foreach (var n in nS) { var aS = n.SelectNodes("a"); ... }

    Read the article

  • How does youtube enable ascii videos?

    - by acidzombie24
    Just by messing around a little it seems that the video stream is not ascii. i tested by downloading the stream. It would be insane if it was. Theres so many videos. So that couldnt be it. Youtube seems to not work with javascript disable (not counting mobile if true). How is it being done? is it javascript magic? is the SWF running the video through a filter in realtime? (I doubt its a native filter so how is the filter compiled) its really cool. I cant imagine how this is running realtime yet it is!

    Read the article

  • bat file. delete until success?

    - by acidzombie24
    I run a bat file to clean up and sometimes it takes a few seconds for my app to full close. In it i delete a database. Instead of waiting or running it multiple times i would like the bat file to continue its attempts until it has a success. How can i do that?

    Read the article

  • A Solution For (IEnumerable<Base>)Derive; Yet?

    - by acidzombie24
    I have D1 and D2 which derive from B. When i write var ls = (IEnumerable<B>)(cond?lsD1:lsD2); I get a runtime cast error. IIRC this is a well known problem. My question is 1) Is this allowed yet? perhaps in .NET 4? I have 2010 but my project is a few months old, large and targets 3.5. 2) Is there a simple workaround? I only need to read the list not add anything or remove. Actually, ToArray() would probably work but is there another solution?

    Read the article

< Previous Page | 9 10 11 12 13 14 15  | Next Page >