Search Results

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

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

  • How do i return a StringWriter When I cant Clone it?

    - by acidzombie24
    My code looks like the below. Obviously i cant write 'ok' because the object has been disposed. I cant do return sw.Clone() bc clone doesnt exist. If i dont use a using then at any point between = new and return (like iterating and writing to the object as my example doesnt do) can have an exception and thus not disposing the object. Am i to define sw outside of a try block and check if its null then dispose in a catch block? That seems like a bit of excessive work. Is there a better way? is that the only way? static void func1() { using (var sw = func2()) { sw.WriteLine("Ok"); } } static StringWriter func2() { using (var sw = new StringWriter()) { return sw; } }

    Read the article

  • Array split by range?

    - by acidzombie24
    I have an array, i don't know the length but i do know it will be =48bytes. The first 48bytes are the header and i need to split the header into two. Whats the easiest way? I am hoping something as simple as header.split(32); would work ([0] is 32 bytes [1] being 16 assuming header is an array of 48bytes) using .NET

    Read the article

  • launch an app to record keep with greasemonkey

    - by acidzombie24
    I have my greasemonkey script scanning every page i visit for a specific string. I would like to recordkeep the variations of the string in a sqlite db. I'll have another app process this db everyonce in a while. What i dont know is HOW do i store the data into the sqlite db? i was thinking i can launch an executable automatically if the string was found but i dont know how to do that through javascript. Another alternative i thought was have a socket listen on a certain port and have some js magic but i couldnt think of a silent way to send data like that.

    Read the article

  • How do i write task? (parallel code)

    - by acidzombie24
    I am impressed with intel thread building blocks. I like how i should write task and not thread code and i like how it works under the hood with my limited understanding (task are in a pool, there wont be 100 threads on 4cores, a task is not guaranteed to run because it isnt on its own thread and may be far into the pool. But it may be run with another related task so you cant do bad things like typical thread unsafe code). I wanted to know more about writing task. I like the 'Task-based Multithreading - How to Program for 100 cores' video here http://www.gdcvault.com/sponsor.php?sponsor_id=1 (currently second last link. WARNING it isnt 'great'). My fav part was 'solving the maze is better done in parallel' which is around the 48min mark (you can click the link on the left side). However i like to see more code examples and some API of how to write task. Does anyone have a good resource? I have no idea how a class or pieces of code may look after pushing it onto a pool or how weird code may look when you need to make a copy of everything and how much of everything is pushed onto a pool.

    Read the article

  • Why shouldn't I use Flash?

    - by acidzombie24
    I heard many times i should avoid flash for my website. Yet no one has told me a good reason. I searched for reasons and i see many that are not true (such as text in flash are not indexable by search engines) or may not necessarily be true or significant enough (eating more bandwidth. Would a JS equivalent be bigger or smaller?). My site uses flash to playback sound (m4a). I dont have to worry about indexing, the back button not working, etc. But i have feeling there may be other reasons. What are reasons i shouldnt use flash on my website. I'll note one, the fact iphone/itouch and mobile devices does not support it. Not a big deal for most sites and is obvious. What are reason to avoid flash on my site?

    Read the article

  • Weird location while moving WinForms picbox

    - by acidzombie24
    I couldnt figure the problem out so after debugging i finally decide to write the below. Why is the location jumping around?! 147 86 to 294 212 then back every callback? pic.MouseMove += my_MouseMove; my_MouseMove(object sender, MouseEventArgs e) Console.WriteLine("{0} {1} {2} {3}", e.X, e.Y, e.Location.X, e.Location.Y); 147 86 147 86 294 212 294 212 147 86 147 86 294 212 294 212 147 86 147 86 294 212 294 212

    Read the article

  • Use of LOC to determine project size

    - by acidzombie24
    How many lines of code (LOC) does it take to be considered a large project? How about for just one person writing it? I know this metric is questionable, but there is a significant difference, for a single developer, between 1k and 10k LOC. I typically use space for readability, especially for SQL statements, and I try to reduce the amount of LOC for maintenance purpose to follow as many best practice as i can. For example, I created a unified diff of the code I modified today, and it was over 1k LOC (including comments and blank lines). Is "modified LOC" a better metric? I have ~2k LOC, so it's surprising I modified 1k. I guess rewriting counts as both a deletion and addition which doubles the stats.

    Read the article

  • Why do SQL connection leave parameters in?

    - by acidzombie24
    While coding with sqlite everytime i always had the exact number of parameters and when i executed the query i always had 0 parameters after it. I kept using the cmd object and it worked fine. Now while porting to use sql server (2008) my SqlConnection has parameters left over from a successful command. Why? I seem to be able to create tables without the problem (then again i may have use a clone of an empty cmd since i use recursion). Does SqlCommand always leave the parameters in after a query? This always breaks the following query unless i do parameter.clear(). Should i create a new SqlCommand object? or use parameter.clear() each time? I'm somewhat confused.

    Read the article

  • Make MediaWiki use accounts on my site?

    - by acidzombie24
    I have a site in ASP.NET and i thought it would be cool if i can redirect users to wiki.mysite.com. Now i would like to know if i can easily make MediaWiki recognize users logged into my site. I dont want any anonymous posters. Is there a way to hook or have mediawiki use accounts/cookies from my site instead of using its own database/account system?

    Read the article

  • Do i need to dispose of MySqlCommand?

    - by acidzombie24
    I find it incredibly annoying to write a using statement on every one of my queries (which require its own command or write parameters.clear()) which sometimes require declaring variables outside of the using block. Its so incredibly annoying and looks much dirtier compared to the version without disposing the object. Do i need to dispose of it? what happens if i dont? I do know its good practice to dispose of an object when it has that interface.

    Read the article

  • Why are joins bad when considering scalability?

    - by acidzombie24
    Why are joins bad or 'slow'. I know i heard this more then once. I found this quote The problem is joins are relatively slow, especially over very large data sets, and if they are slow your website is slow. It takes a long time to get all those separate bits of information off disk and put them all together again. source I always thought they were fast especially when looking up a PK. Why are they 'slow'?

    Read the article

  • Should i write my own forum? If my site has banning/PM/etc?

    - by acidzombie24
    I built a site from scratch (already done). It has banning, PM, comments, etc. The PMs and comments are done using markdown (like SO system). Should i write my own forum code or should i find one already made? What are reasons for or against writing my own? There are pros and cons for writing my own or using another software. But some cons keeping me from using another forum software is Multiple Logins: One for the site, one for separate forums. Need to Customization code: I'll need to change the toolbar in the forum software so i can access pages on the regular site. Look consistency: It may look drastically different from my site even after applying lots of css changes. Banning and User consistency. Users may be ban on site or on forums but not the other. users may select a different or multiple usernames on the forum instead of being forced to use the same username on both site and forum. What are reasons for or against writing my own and using forum software?

    Read the article

  • asp.net on linux/mono broken? weird load then 404/resource error

    - by acidzombie24
    I am testing out my asp.net on mono's VM Ware Image using opensuse From the home page it says Trying out your own code You can test your own applications by connecting with the file manager on this machine to the machine hosting your application, and copying over the directory containing application and its associated files. To test your ASP.NET applications, copy your code to a new directory in /srv/www/htdocs , then visit the following url: http://localhost/directoryname/page.aspx Where directoryname is the directory where you deployed your application, and page.aspx is the initial page for your software, typically Default.aspx. Mirror: http://tortillaflatscafe.com/ I saw my app had errors. After i restarted the VM i can no longer run my app. Instead of getting error messages or anything i get this error instead. Server Error in '/myfoldername' Application The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /Default.aspx I tried /default.aspx, using sudo to set permissions to 777 recursively, restarting apache via terminal i could not get this error to go away. How do i fix this?

    Read the article

  • Add not null DateTime column to SQLite without default value?

    - by acidzombie24
    It looks like i cant add a not null constraint or remove a default constraint. I would like to add a datetime column to a table and have all the values set to anything (perhaps 1970 or year 2000) but it seems like i cant use not null without a default and i cant remove a default once added in. So how can i add this column? (once again just a plain datetime not null)

    Read the article

  • iframe change event

    - by acidzombie24
    i have an iframe with a form that the user fills and submits. When the form is finished submitting i would like some js code using jquery to tell the main page (which holds this iframe) that the user has submitted the form. What event can i use to check this? i tried .change(function () without success

    Read the article

  • avoid textarea rows/cols error?

    - by acidzombie24
    I am using a few page validation tools one problem i have is they tell me textarea must have rows and cols attribute. If i am setting this in CSS or using display:none (and using it to hold raw text data) can i do something to skip? it seems like the only answer is rows="0" cols="0" each time i use it. But i have a feeling that is not a good solution.

    Read the article

  • C# sqlite syntax in ASP.NET?

    - by acidzombie24
    -edit- This is no longer relevant and the question doesnt make sense to me anymore. I think i wanted to know how to create tables or know if the syntax is the same from winform to ASP.NET I am very use to sqlite http://sqlite.phxsoftware.com/ and would like to create a DB in a similar style. How do i do this? it doesnt need to be the same, just similar enough for me to enjoy. An example of the syntax. connection = new SQLiteConnection("Data Source=" + sz +";Version=3"); command = new SQLiteCommand(connection); connection.Open(); command.CommandText = "CREATE TABLE if not exists miscInfo(key TEXT, " + "value TEXT, UNIQUE (key));"; command.ExecuteNonQuery(); The @name is a symbol and command.Parameters.Add("@userDesc", DbType.String).Value = d.userDesc; replaces the symbol with escaped values/texts/blob command.CommandText = "INSERT INTO discData(rootfolderID, time, volumeName, discLabel, " + "userTitle, userDesc) "+ "VALUES(@rootfolderID, @time, @volumeName, @discLabel, " + "@userTitle, @userDesc); " + "SELECT last_insert_rowid() AS RecordID;"; command.Parameters.Add("@rootfolderID", DbType.Int64).Value = d.rootfolderID; command.Parameters.Add("@time", DbType.Int64).Value = d.time; command.Parameters.Add("@volumeName", DbType.String).Value = d.volumeName; command.Parameters.Add("@discLabel", DbType.String).Value = d.discLabel; command.Parameters.Add("@userTitle", DbType.String).Value = d.userTitle; command.Parameters.Add("@userDesc", DbType.String).Value = d.userDesc; d.discID = (long)command.ExecuteScalar();

    Read the article

  • SDL.NET runtime without installation?

    - by acidzombie24
    With plain old sdl in C i would copy the dlls i need into the exe directory and was able to run without install. Now i am using sdl.net. I tried doing that but had no luck. Not even a clue to what dlls are missing as i did in the old C way. How can i have users run my sdl app without installation?

    Read the article

  • Built in raytracing?

    - by acidzombie24
    Relating to this question i was wondering if .NET has any libs (or a function) i can use to detect if one point collides with another. I am not sure what angles i should use but is there some function like this func(point src, rect target, angle, distanceOfVision, listPointOrRectOfWalls) Pretty unlikely but i dont know a formula or how to start. Its a quick and dirty prototype. I am thinking of writing the func about but dropping angle and just make line of sight a rectangle and check if any points is between src and target.

    Read the article

  • How do i refresh a page with a hash?

    - by acidzombie24
    I refresh pages by writing window.location = window.location; however this doesnt work on a page like /page#c22. It will just jump to whereever c22 is. How do i refresh the page? It does not need to use go to #c22 once refreshed but i am sure there is a more dependable way then window.location = window.location

    Read the article

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