instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Greetings all, I was wondering if someone could provide some sort of explaination or confirm my guesses. I had a program with a for loop which executed several hundred of thousand times, each time adding numbers to a selection of ArrayLists. Confused as to why it was taking so long to execute I investigated further. It...
stackexchange/codereview
I am new to this technology, I dont no how to write a server side program and how to run before jsp page start to load. Any one can you please guide me how to do it? Thanks in Advance, Ver
stackexchange/codereview
I was using MySQL's concat_ws function to get data from MySQL database and it was working perfectly. I discover this query through this SO Question. Now I have same case but this time database is SQL Server. Asking again for SQL Server: I have a table like this: id | roll_no | name --------------------- 1 | 111 | ...
stackexchange/codereview
There's a few tutorials and classes out there but they no longer appear to work since Twitter changed to oAuth. How do I send a tweet from PHP, in the most basic way possible? For example, the 'old' way using the MyTwitter class was as follows: require_once('MyTwitter.class.php'); $twitter = new MyTwitter('username', ...
stackexchange/codereview
For me it sounds like the same thing. Updating a file implies to write to the file. Writing to a file is also an update for me. But I guess there's a subtle difference ;-) Does anyone know?
stackexchange/codereview
I want to interpolate a polynomial with the Lagrange method, but this code doesn't work: def interpolate(x_values, y_values): def _basis(j): p = [(x - x_values[m])/(x_values[j] - x_values[m]) for m in xrange(k + 1) if m != j] return reduce(operator.mul, p) assert len(x_values) != 0 and (len(x_v...
stackexchange/codereview
I have to make connection to the DB and Insert a row based on the data that the SWF sent me... I will need to make it so that the SWF->PHP part is secure by not letting users tamper with data. I don't want to use SSL because its not a suitable solution... what other method is available?
stackexchange/codereview
I made an universal binary and didn't implement any sort of device orientation rotation. Is that a reason for rejection?
stackexchange/codereview
I am using a jquery function to take the value of the hash tag in the URL and load that URL into a div id'd 'inload_content'. As seen at http://www.divethegap.com/update/community/ (# When testing only use the 2 test videos at the bottom as the others are not connected to URLs yet. In Safari this works perfectly both o...
stackexchange/codereview
Sometimes I "Mark for Add" and add files to Perforce which I actually didn't want Perforce to worry about. Is there a way to revert it so it just goes back to showing in P4V as an "untracked" item? See my example: I've added mil.ico and mil3.ico by mistake. I just want them to go back to looking like test.ico, ie. ign...
stackexchange/codereview
I'm new to WinDBG. I'm looking for the cause of a memory leak and I've got as far as my current knowledge can take me. My MVVM App is leaking MyLovelyView objects. In WinDBG I run !dumpheap -type MyLovelyView and get the following: Address MT Size 05f2a978 0bc948d4 12 05f39638 04d51114 36 ...
stackexchange/codereview
I have dynamic text field that must be a fixed width and height. The actual text that will populate the dynamic text field is variable. What I would like to do is to reduce the font size if the text does not completely display within the text field's dimensions. Any ideas on how I can accurately perform this? Also...
stackexchange/codereview
I'm trying to create a custom MessageBox by using a WPF Window that is called with ShowDialog(). So far, I've managed to implement everything, except for one thing. As you know, when you use MessageBox.Show("text"); you cannot set the focus or click the parent window (the one that called the MessageBox). If you do try ...
stackexchange/codereview
I'm using delphi XE. I'm developing a component that is come from TPanel. TApGUITab=class(Tpanel) I handled key down event by handling WMKeyDown message, but it isn't called when I press arrow keys and it sets focus to another control instead of calling the event. What should I do now?
stackexchange/codereview
I have to decode, using Java, HTML strings which contain the following entities: "&#39" and "&apos". I'm using Apache Commons Lang, but it doesn't decode those two entities, so, I'm currently doing as follows, but I'm looking for the fastest way to do what I want. import org.apache.commons.lang.StringEscapeUtils; publ...
stackexchange/codereview
I am a bit lost with the memory management. I've read that you should release whenever you alloc. But when you get an instance without the alloc, you shouldnt release. What about this situation, just need to know If I was coding correctly. I'm still new on iphone dev. I have a class CustomerRepository it has a method...
stackexchange/codereview
On my PC DWG files open with: "C:\Program Files\AutoCAD LT 2007\acadlt.exe" "%1" If I run this from the command line: "C:\Program Files\AutoCAD LT 2007\acadlt.exe" "C:\Some Path\Test.dwg" AutoCAD Lite open the DWG file. Similarly if I open a command prompt and run the same exe with argument, it works fine. However if...
stackexchange/codereview
I'm using ScrollableText control to display EULA and everything works fine except the following scenario: When EULA dialog is displayed select some word(s) then minimize the EULA window. After restoring the window whole license information disappeared. But after selecting some area in the control the EULA text is appe...
stackexchange/codereview
I am looking to make a script that runs and uses the time stamp of the last time it ran as a parameter to retrieve results that have been updated since that time. We were thinking of creating a database table and having it update that and then retrieve the date from there, but I was looking for any other approach that ...
stackexchange/codereview
In my C# (.NET 2) app I'd like to determine which control is closet to the mouse. I can think of a few ways to do this that won't quite work right. I could use the Control.Location property, but that just gives me top/left, and the mouse might be on the other side of the control. I could calculate the center point of a...
stackexchange/codereview
I am reading osdev wiki. I came across these two lines of code. nasm kernel.asm -f bin -o kernel.bin dd if=kernel.bin of=/dev/fd0 I can understand the first line but I can't understand the second line. what the second line do? what is this dd command? what is this /dev/fd0 here? Can anybody explain me this pleas...
stackexchange/codereview
I'm using an HTML document to show text output in my application - this gives me the flexibility of HTML and the power of CSS, and I can publish the generated HTML as a log file openable in any browser. When new information is available, I update the HTML file and then call Refresh() on my WebBrowser control. Natural...
stackexchange/codereview
I am trying to use jQuery .load() to get straight html from a asmx web service: $('#target').load('MyService.asmx/GetHtml'); In .NET code, GetHtml() returns as string: [WebMethod(EnableSession = false)] [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Xml)] public string GetHtml() { ...
stackexchange/codereview
I'm writing a custom decorator plugin for Cloudera's distributed log aggregation system, Flume. My Java code is below: package multiplex; import java.io.IOException; import java.util.ArrayList; import java.util.List; import com.cloudera.flume.conf.Context; import com.cloudera.flume.conf.SinkFactory.SinkDecoBuilder; i...
stackexchange/codereview
I have a C# class that I want to loop through the properties as a key/value pair but don't know how. Here is what I would like to do: Foreach (classobjectproperty prop in classobjectname) { if (prop.name == "somename") //do something cool with prop.value }
stackexchange/codereview
from django.db import models class Entry(models.Model): title = models.CharField(max_length=30,null=False) body_text = models.TextField(max_length=255) author = models.ForeignKey(User) def __unicode__(self): return self.title class Meta: ordering = ('title',) class User(mo...
stackexchange/codereview
I have a car model with different parts of the car described in vertex groups.
stackexchange/codereview
IE9 is still in Beta, but all the same, here is a question: Using prototype.js 1.6.1, proper form for adding a click event to a link, and override the default link behavior, would be: mylink.observe('click', function(e){ doSomething(); e.stop(); }); While this works perfectly in every other browser that I tried,...
stackexchange/codereview
Consider 3 assemblies: EntryPoint (SL app) ClassLibraryA ClassLibraryB Where there is a class A in ClassLibraryAand a class B in ClassLibraryB EntryPoint has a reference to ClassLibraryA, and ClassLibraryAhas a reference to ClassLibraryB. In the AssemblyInfo of ClassLibrary1 I have the following code: [assembly: Xml...
stackexchange/codereview
My select_screen_menu.xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/home_menu" android:icon="@drawable/home_tab" android:title="Home" /> <item android:id="@+id/submit_report" android:icon="@drawable/submit_ta...
stackexchange/codereview
I've created a listbox which contain filenames. I want to give user a option to move up and down file name using up/down button and using drag and drop. Anyone has an idea how to achieve this functionality. XAML Code: <ListBox Grid.Column="0" Name="listBox1" AllowDrop="True" Drop="listBox1_Drop" /> <Sta...
stackexchange/codereview
man epoll: The suggested way to use epoll as an edge-triggered (EPOLLET) interface is as follows: i with nonblocking file descriptors; and ii by waiting for an event only after read(2) or write(2) return EAGAIN. Imagine we have two fds: the first is passive, data available only sometimes, the second is acti...
stackexchange/codereview
I will try to be as brief as possible... I have published a very simple android application it's name is "Vib-e-rator PRO". It's purpose is obvious, it can be used as a masssage vibrator or as an erotic stimulator... My Problem is don't have an Android Phone to test my app in real time. I have been recieving mixed comm...
stackexchange/codereview
My question is as follows: Refer to the following array declaration in the main(): const int size = 4; int x[size][size] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 8, 7, 3}, {2, 1, 7, 1}}; Write a function SwapRows() to swap two rows of the above 2D array. For example, if the function has been called to swap the first and t...
stackexchange/codereview
So my father runs a rather small business. I'm going to set him up with a website using RefineryCMS (that's a ror-based cms).. He will probably get less than 500 hits a month. Do I really need to set up mongrel cluster for this as about every tutorial on the web suggests? Does anyone some good reading material for set...
stackexchange/codereview
Using the Connectivity Manager Class we can get access to either wifi or Internet Network: ConnectivityManager connec = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); // ARE WE CONNECTED TO THE NET if ( connec.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTED || connec.getNetworkInfo(...
stackexchange/codereview
I am using Boost's uBLAS in a numerical code and have a 'heavy' solver in place: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?LU_Matrix_Inversion The code works excellently, however, it is painfully slow. After some research, I found UMFPACK, which is a sparse matrix solver (among other things). My ...
stackexchange/codereview
I want to merge the records of two IQueryable lists in C#. I try IQueryable<MediaType> list1 = values; IQueryable<MediaType> list2 = values1; obj.Concat(obj1); and IQueryable<MediaType> list1 = values; IQueryable<MediaType> list2 = values1; obj.Union(obj1); but if list1 is empty then the resultant list is also empt...
stackexchange/codereview
I am developing a game where the user plays a slot machine. The slot machine needs to randomise the 3 different symbols in nine pieces fields, for example the symbols: A A A O A O X X X I am using a two-dimensional array but I don't know how to randomise the array? The second problem. I don't know how to compare th...
stackexchange/codereview
A possibly "silly" question. Would I possibly run into any problems (incompatibilities) deploying eg.: on Centos/Apache (php5/MySQL5) a project developed on Win desktop (WAMP/XAMPP - php5/MySQL5). I found some answer: here on Stack. But it does not address all my concerns. If I missed any thread - I appreciate a link....
stackexchange/codereview
Recently, I've been experimenting with caching objects with HttpRuntime.Cache and I was generally under the impression that if I "added" something to the cache like this: HttpRuntime.Cache.Insert("Test", "This is a test!", null, Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration, CacheItemPriority.NotRem...
stackexchange/codereview
I have a text file that I extracted from a PDF file. It's arranged in a tabular format; this is part of it: DATE SESS PROF1 PROF2 COURSE SEC GRADE COUNT 2007/09 1 RODRIGUEZ TANIA DACSB 06500 001 A 3 2007/09 1 RODRIGUEZ TANIA DACSB 06500 001 A- 2 2007/09 1 RODRIGUEZ TANIA DACSB 06500 001 B 4 2007/09 1 RODRI...
stackexchange/codereview
I am using ant script and running a junit, the problem I am facing is that I am unable to get the output on console, rather I get the output in a log file. how can I achieve that.. I am using the following script. <target name="validate_mapping" description="Testing the Hibernate "> <path id="validator.classpath"...
stackexchange/codereview
I want to have a Microsoft office word inside a web browser so that i can get the control to format the text and specify proper indentation. I don't want a client side to save the document. It should be the same as http://www.asp.net/ajax/ajaxcontroltoolkit/samples/htmleditor/htmleditor.aspx but i want an additonal com...
stackexchange/codereview
I'm working on a high usage system which maps a few "read only" tables and views. At various points in time I need to replace the data in these tables with a newer version by connecting to the database externally. We are using postgres 8.3+ and hibernate 3.2.6. The external "update" process will be connecting to the db...
stackexchange/codereview
I am making a synchronous request to the web service and unable to show the loading... alert. As I am unable to access UI while synchoronous request. Can you anybody please guide me to show the activity indicator whle I am making synchoronous request. Is it possible to show the loading message if run the synchronous ...
stackexchange/codereview
I edited a few .jelly files for Hudson, but it's not reflected. How do I restart Hudson ? I hope that this will display the HTML tag changes made in the .jelly files. I am trying to change the look and feel of the Hudson.
stackexchange/codereview
I.e. transferring the state from one object to another object, which shares some (but not all) of the first object's members. I'm not applying this question to any real-life problem yet, but I guess I'm asking it to get a feel for the differences between the problem-solving approach in LISP as opposed to object-oriente...
stackexchange/codereview
I want to have a web button that is generated dynamically depending on which checkboxes a user selects, without needing to reload the page. I guess jQuery is the way to do this but I am a complete noob with jQuery/JavaScript (trying to learn on the fly, which isn't easy). Ultimately, I think it s/b a 2-step process: (1...
stackexchange/codereview
Hey guys, I'm doing an ASP.NET MVC project just for learning...and stuck in this... I'm trying the get the value from the Html.TextBoxFor(model => model.ShortName) and show in the side www.blablabla.com/Value, it in the time of the user is typing. I tried to add the AJAX library reference on the top: <script src="../.....
stackexchange/codereview
I have a datalist with products we use on our product page. I'm generating javascript for each item in the collection using: foreach (ProductItem item in _prod.ActiveProductItemCollection) { sb.Append("<script type='text/javascript'>"); sb.Append("mboxCreate(\"product_productpage_rec\","); } and so on... What...
stackexchange/codereview
I want to show the number of characters left for a new tweet, after a key has been lifted. Currently, this only happens if return is lifted: - (IBAction)updateCharacterCountFromNewTweetField:(id)sender { [newTweetCharacterCount setIntValue:140 - [[sender stringValue] length]]; } This action is connected to an NSText...
stackexchange/codereview
Is it possible to have maven do a cargo:redeploy while I am doing a release:perform? Currently, we do a release:perform which removes -SNAPSHOT from the version, builds, commits, and then increments the version. This places the final version WAR in the target/ directory but running cargo:redeploy sees the new version n...
stackexchange/codereview
I am using Liferay 5.2.3 CE. How can I disable css minifier. Thanks.
stackexchange/codereview
i just upgraded my iPhone 3GS to iOS 4.1 and also downloaded the latest Xcode 3.2.4 and iOS sdk 4.1....i was working on an application on previous sdk iOS 4.0 but now when i build the project with new sdk xcode says No Provisioned iOS Device is connected...do i need to install a new provisioning profile for the project...
stackexchange/codereview
on my website i have two types of files that end users can download - one of them are available for all visitors, and second is only for registered users (users that are logged in). setting of drupal allows to set only if files are available for all users or only for users that are logged in. how can i achieve that som...
stackexchange/codereview
I searched for a sample for this, but could not find something that explains clearly how to set it up using RX: I have this requirement... In a WPF app, i have a list box A dispatcher timer routine adds some random numbers to a local List every say 2 seconds Now i want to setup an observable/observer to watch this Lis...
stackexchange/codereview
I have several tables in my HTML markup which don't have any attributes and I'm wondering: is it possible to define a jQuery selector which directly picks eg. the third table?
stackexchange/codereview
I found two functions to get cookie data with Javascript, one on w3schools.com and one on quirksmode.org I would like to know which one I should use? For example I believe I read somewhere that there was a problem with some browsers splitting the ; semicolon? w3schools: function getCookie(c_name) { if (document.coo...
stackexchange/codereview
Hi I'm want to use ruby on rails to create a facebook connect web site with full facebook integration (events API) can I use OmniAuth for authentication and facebooker to handle the facebook API together ? Is facebooker up to date with the latest API changes in Facebook ? Can you recommend any good articles about the s...
stackexchange/codereview
I have a route in my config which says that for a page, say /secure, there is a login required (done via authlogic). A before_filter in my controller takes care of that. That works fine, the page and its resources have restricted access - through the application. Trouble is, we are using Amazon S3 for storage on this a...
stackexchange/codereview
I am trying regex to find out whether a number is divisible by 10 or by 5. So basically, I am trying to see whether the number end in 0 or 5. This is my regular expression ^[1-9]*0?.0$ I encounter issues when the input is 100.0 or 55.0 What should the regular expression be? Thanks, Sandy
stackexchange/codereview
Is it possible to access a webservice through an Android app? So basically a user would be purchasing access to the site by paying for the app? Then deploy rich content to the user through the browser? If so, is it then possible to authenticate who has access to the site from the webserver without the need for signin o...
stackexchange/codereview
I have a product-based website and I'd like to expand the number of file formats/layouts that we accept for inventory uploads. Ideally that would be done using some existing implementation that supports various file formats and assists in validating and allowing user corrections to the uploaded data. Anything giant and...
stackexchange/codereview
In a master / detail scenario, I use an Edit ActionLink that fetches the partial details view via a jQuery Ajax call; pretty typical, right? The problem I've come across is when a user's auth token expires and he clicks on the Edit ActionLink. The returnUrl parameter of the LogOn action is being set by the ActionLink ...
stackexchange/codereview
in jquery $(document).ready(function) or $(function) , how could I do the same thing without jquery, and I need browser compatiable, and allow to attach more than one function. Note: dom ready!= window onload
stackexchange/codereview
In my app I want to use $this->forward404("Data not found"); to output individual error messages when necessary. In the dev mode it works fine. When I run my app in production mode - where debug is set to false in getApplicationConfiguration() - I don't get the messages anymore. in settings.yml I set a custom 404 actio...
stackexchange/codereview
I am developing an iPhone application which handles groups in iPhone contacts, but as my observation there is no facility to create groups in iPhone contacts, but in the SDK we have been given a framework for creating and managing groups, so I decided to create groups from application interface and add contacts to that...
stackexchange/codereview
I have one textbox in my entire app that I want to be able to accept html. I don't really want to go through all my pages and add Server.HtmlEncode(textbox.Text). Is there a work around. I'm using C# and asp.net 4.0 and I know the ValidateRequest stuff changed in 4.0 but I don't know if it can solve my problem. Can ...
stackexchange/codereview
I have a page that loads content via ajax. When I click on a list item it shows a detail view of that item via ajax. In the details i have a lightbox that opens up if a link is clicked. I'm using Colorbox for that. What boggles me is that if I use $(selector).click() it won't work, nor the $(selector).bind() either. Th...
stackexchange/codereview
I plan to create custom site using web template.I need to find out what features have activated when I create a site collection using a out of box site definition.How can I do it?
stackexchange/codereview
I have an XML file with information, for example: <letter> <name>Test</name> <age>20</age> <me>Me</me> </letter> And then I have an text template like: Dear $name, some text with other variables like $age or $name again greatings $me When using xslt to transform the XML to the plain text letter I can use some...
stackexchange/codereview
I'm using EF 4.0 and was able to create self referencing many to many relationship. Person and family members. What I also want is to add additional attribute like 'mother', 'brother', 'sister' for each relationship. At the database level, this model generates two tables. Person and PersonRelationship. PersonRelationsh...
stackexchange/codereview
I've got a tiff image that is greyscale, and when I load it using Image.FromFile, the quality of that image is very pixelated. However, if I save the tiff as indexed in Gimp beforehand, then loading that image with Image.FromFile is no longer pixelated. Is there anyway I can load a greyscale image at the original quali...
stackexchange/codereview
I am using rails to build a web app which provides each business with its own account and subdomain, Similar to how basecamp (and other 37 signals apps) lighthouseapp.com, and so on. Now I know that there are lots of decent tutorials on how to do subdomains in rails, and even the subdomain-fu plugin. The thing is that ...
stackexchange/codereview
I have created an asp.net MVC application in VS 2010, and am using TFS. When another programmer opened my application from TFS and tries to run it (he is also using VS 2010) He gets an error saying type or namespace MVC cannot be found in System.web what do we need to do to get this to build on his machine? Thanks!
stackexchange/codereview
I'm trying to create an expression tree that's similar to performing subqueries like: SELECT (SELECT Sum(Foo) FROM Bar1) - (SELECT Sum(Foo) FROM Bar2)) I'm trying to reuse 2 expression trees that are too complex to repeat. What I have right now is 2 (simplified) expression trees: Expression<Func<Bar, int>> SumBar1 = ...
stackexchange/codereview
I have an array of strings. Some of The strings are similar (for example, person is similar to twolegperson, animal is similar to animalgold). I want to find the strings that are repeated more than 1 times (here person,animal). Thank you very much faty
stackexchange/codereview
I'm writing a game for IPhone in Opengl ES, and I'm experiencing a problem with alpha blending: I'm using glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA) to achieve alpha blending and trying to compose a scene with several "layers" so I can move them separately instead of having a static image. I created a prev...
stackexchange/codereview
var vis = new pv.Panel().canvas('grphLangSpeakers').height(langCount*(barWidth+barGap)).width(canvasWidth) .add(pv.Bar) .data(popCountArray) .bottom(0).width(function(d){ return d}) .height(barWidth) .top(function() {return this.index * (barGap+barWidth)}); vis.render(); I'm using above code to ge...
stackexchange/codereview
i have a div: <div id="div"></div> with $("#div").append("<div id='c'></div>") $("#c").length returns 0. what i can do for find the div width id = c after inserted in div #div? thanks
stackexchange/codereview
By default url.openStream(); uses IPv6. My schools server silently blocks IPv6. This causes url.openStream(); to hang for 3 minutes and 15 seconds. Is there a way that I can get url.openStream() to use IPv4 by default?
stackexchange/codereview
Trying to do a 301 redirect using apache mod_rewrite: RewriteRule /the-path/(.*) my-scheme://new-site.com/the-path/$1 [R=301,NC,L] The path http://site.com/the-path/param1=xyz will redirect to http://site.com/my-scheme://new-site.com/the-path/param1-xyz But when I use "http" or "https" in place of "my-scheme" in the...
stackexchange/codereview
I have an xml string that wanted to be sent to server: <script type="text/javascript"> $(document).ready(function() { // put all your jQuery goodness in here. $('#button').click(function() { $.post('http://localhost/a.bc', { cmd:"<cmd cmd_n...
stackexchange/codereview
Is there any Cross platform development tool named Airplane available?
stackexchange/codereview
Is it @cart have to put in :object ? @cart.item have to put in : collection ?
stackexchange/codereview
Does anyone have any examples of input validation changing the input border color to red? Thanks. Erik
stackexchange/codereview
I am doing an SSIS package that would go out to all our DB servers to gather information about them, and what is on them. And in this one case there is a SQL 2000 box with a bunch of DTS packages on there. Now I can easily list the Local Packages using "exec sp_enum_dtspackages", but this doesn't list the Meta Data Se...
stackexchange/codereview
For some reason, the developers at a new company I'm working for decided to name their columns "ignore" and "exists". Now when I run MySQL queries with those words in the where clause, I get a syntax error; however, I can't seem to figure out how to reference those columns without running into an error. I tried setting...
stackexchange/codereview
active_scaffold :formats do |config| format_order = Format.find(:all, :select => :format_order, :order => :format_order).collect(&:format_order) format_order << format_order.size + 1 # I want only implement when new config.columns = [:name, :format_order] config.columns[:format_order].form_ui = :select...
stackexchange/codereview
How to add image in place of text in navigation bar ?
stackexchange/codereview
I'm trying to write an MSIE only HTML page (which I'll call the "Title Page") that allows someone to save a generated HTML webpage (which I'll call "New Page") with a click of a button. What I found out is that the "Save As" dialog box that appears does not allow for the "New Page" to be saved as UTF-8 without BOM. It...
stackexchange/codereview
I am trying to send a serialized object from a server process to a client process in Java using UDP. The problem is that the client is being blocked on the receive method. Can someone help?! here is the server code for sending the object: ClientModel C1= new ClientModel(100,"Noor","Noor",38,38,"asd"); ByteArrayOutp...
stackexchange/codereview
I've got an array of images, which I want to display in a gallery. I want each image to have a small icon overlayed inside it, on the bottom right hand corner (e.g. a light bulb). When the user clicks on the image or the icon, the icon will change from the 'lighbulb_off' image to the 'lightbulb_on' image, and the inde...
stackexchange/codereview
I have a C++ program that will read in data from a binary file and originally I stored data in std::vector<char*> data. I have changed my code so that I am now using strings instead of char*, so that std::vector<std::string> data. Some changes I had to make was to change from strcmp to compare for example. However I h...
stackexchange/codereview
I have an animated GIF that plays once (doesn't loop). I would like it to animate when clicked. I tried something like this: $('#plus').click(function(){ $('#plus').attr('src',''); $('#plus').attr('src','img/plus.gif') }); With the hope that quickly resetting the src would trigger the animation, but no luck....
stackexchange/codereview
This is weird, so be patient while I try to explain. Basic problem: I have a massive string -- it can be of varying lengths depending on the user. My job is to acquire this massive string depending on the user, then send it off to the other piece of software to make a tag cloud. If life were easy for me, I could simpl...
stackexchange/codereview
Generally I would never expect to see those 2 words together in the same sentenc, however im working on a project that requires me to do simple pathfinding on multiple roads and I'm just trying to work out the best way to do it. I was originally thinking of having a few wcf services that could accept an origin and dest...
stackexchange/codereview
So I've got: class bc_Game { public: //blah private: b2World world; }; bc_Game::bc_Game() { //blah, defining variables used world = b2World(gravity, sleep); } Now, I just get error: no matching function for call to 'b2World::b2World()' note: candidates are: b2World::b2World(const b2Vec2&, bool) note: ...
stackexchange/codereview
I do have a program which logs some specific events in a text file (it keeps the file open). Now I want to program a second application which shows these logs on a form. can I set an event for any change in a text file which is opened by another process? or I have to read that regularly? thanks
stackexchange/codereview