instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
In my XML, I've set the focusable, focusableInTouchMode, clickable, and longClickable variables to false, yet I can still click and move the SeekBar. Do I need to actually change the listener events to do this? That seems so unnecessary.
stackexchange/codereview
I have searched much materials,but dint got answer. please give some tips,thanks !! Oracle11g-x64-ent 11.1.0.6.0, SUSE Linux Enterprise Server 10 SP2 (x86_64), the envirement set by: export ORACLE_BASE=/home/oracle/dttest/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1 export ORACLE_SID=orcl export LD_L...
stackexchange/codereview
I've made a simple website in ASP.NET MVC Framework with users, articles etc., and images to users profiles. There is a simple static class for image manipulation (resizing, cropping and saving images on hard drive), placed in "Helper" directory. I wonder what to do with the code to preserve MVC principles and make who...
stackexchange/codereview
Hi I need to write the result of a mysqldump to a file with a standard windows commands. System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.EnableRaisingEvents = false; proc.StartInfo.WorkingDirectory = "sample directory"; proc.StartInfo.FileName = "mysqldump"; proc.StartInfo.Arguments = "-u root ...
stackexchange/codereview
I have a black web page at yourcashflowpros.com that integrates with fb comments. Fb comments looks like $&%! against a black bg, can someone tell me if i can change the css on the comments or should I just change the background to make it look right? Thanks Todd
stackexchange/codereview
Here's the current branch setup: A---B---C-----------------D---E---F master \ G---H---I---J---K---L branchA I realized when I went to work on branchA, that the last few commits were for a new feature that should be a new branch. So I want to get it such that the tree looks like: A---B---C-----------...
stackexchange/codereview
I've searched post on stackoverflow,found some similar post.But I think this is a different one. My PHP & Mysql server's timezone all set to "UTC". In a table I use a timestamp field,value is "2010-11-08 02:54:15",I use sql like this: SELECT id, updated, second( updated ) , unix_timestamp( updat...
stackexchange/codereview
I've been drying some code, one of this refactors is as following: I have 3 controllers ( ConstructionCompanies, RealEstateCompanies, People) all of which had the following pattern: class ConstructionCompaniesController < ApplicationController before_filter :correct_user, :only => [:edit, :update] private def corr...
stackexchange/codereview
I am trying to find the longest sequence of decreasing numbers in an array. I am not sure what I am doing incorrectly in the following code. public static int getDecSeq(double[] data) { int currentSeq = 1; int currentIndex = 1; int longestSeq = 0; int longestIndex = 0; for (int i = currentIndex; i < data.le...
stackexchange/codereview
i want to know whether there exists an alternative for pyhook(available for windows not on linux) for linux to hook messages.
stackexchange/codereview
I am looking for a good and free (and possibly open-source) BackStage element, based on the Office 2010 backstage. I've already found Elegant UI, but the free demo version of it does a lot of crap to my app - like replacing the icon, creating an annoying popup, etc. Here is what I would like to achieve: http://www.prof...
stackexchange/codereview
Is it possible to add a subview over the window from a uiviewcontroller and then removing that also? Thanks Pankaj
stackexchange/codereview
Again, asking MVC noob questions. Forgive my lack of experience. I have a situation where I am using an MVC route to return a large XML file. Sometimes it can be very large. Currently, I'm using a StringBuilder to build the XML output I want, and then returning it like this: var sb = new StringBuilder(); XmlObject.W...
stackexchange/codereview
I am trying to dump a database to a text file, I am using this statement: .dump | sqlite3 /Users/riceje7/Library/Application\ Support/Firefox/Profiles/4pixicxh.default/downloads.sqlite | gzip -c >database.dump.gz. I get a begin transaction and commit statement in the terminal but the file never saves anywhere on my com...
stackexchange/codereview
I have two tables: Clients (id, clientname) Projects (id, clientid, projecttitle) foreign key reference clientid -> clients.id When I load a project with EF like this: thisProject = (from p in dataEntity.projects.Include("client") where p.id == INTVALUE select p).FirstOrDefault(); Then I...
stackexchange/codereview
I am getting the value from web service, my attribute value is coming like html tag and special character can anybody tell how to parse the value I am getting this exception when i parsing the value using dom parser org.xml.sax.SAXParseException: Attr.value missing f. WIDOWS: (position:START_TAG <ARTICLE ARTICLE_ID='2...
stackexchange/codereview
I have passed a URL string from Java to C code as jstring data type through the use of JNI. And my library method needs a char * as url. How can I convert jstring in char * ? P.S.: Is there any advantage of using jcharArray in C? (i.e. Passing char [] instead of string in native method)
stackexchange/codereview
I'd like to develop a small/medium-size cross-platform application (including GUI). My background: mostly web applications with MVC architectures, both Python (Pylons + SqlAlchemy) and Java (know the language well, but don't like it that much). I also know some C#. So far, I have no GUI programming experience (neither ...
stackexchange/codereview
I have another question asked her on Stack Overflow and was suggested to use regular expressions instead of PHP code. Unfortunately I don’t know regexp, and have tried many times in the past and now to understand it without success. So hopefully, if I ask nicely, someone here could help. I would be very grateful. What ...
stackexchange/codereview
If I want to make sure an operation can only be done once a week by a user, what is an efficient way to do it? If a user has carried out that operation on Friday, then he can still do it on Tuesday, because it's "next" week.
stackexchange/codereview
I would like to imitate this exact feature on this page. (Move mouse toward the top browser bar) http://my-personal-growth.com/personal-growth/what-anthony-robbins-teaches-about-emotions-and-meaning I guess all i need to know is how to create the hovering mouse action, the rest I should be able to handle myself. Any t...
stackexchange/codereview
Hey, I've been playing around with the Datagram classes and I just can't figure out why my "server" won't receive packets from the "client". I've tested it with the server and client both running on my own PC at once and it works perfectly, but if I try to move the server over to another PC, it...doesnt. Now I know I ...
stackexchange/codereview
i have a strange doubt, why toplink creates multiple connection while loading, and why it uses two different connections for reading and writing purposes on database?? Please help
stackexchange/codereview
I have an application that needs to get images that will not be part of the application it's self. But stored on the file System. I have been told the best way to get this is to use a virtual directory rather than getting them staight off the file system like this public FilestreamResult GetPicture(string Filename) {...
stackexchange/codereview
I have an interface based class that I want to have a few static classes as properties. However, I can't seem to find a way to use a static class as an instance property on a class based on an interface. public interface IHttpHelp { ItemsManager {get;set;} } public static class ItemsManager { //static methods } ...
stackexchange/codereview
When I compile this piece of code unsigned char A[] = {1, 2, 3, 4}; unsigned int f (unsigned int x) { return A[x]; } gcc outputs mov edi, edi movzx eax, BYTE PTR A[rdi] ret on a x86_64 machine. The question is: why is a nop instruction (mov edi, edi) there for? Im am using gcc-4.4.4.
stackexchange/codereview
Right now I have only one condition in my Projects.paginate Code is below def list @projects = Project.paginate(:page => params[:page], :per_page => 100, :order => (sort_column + ' ' + arrow), :conditions => ["description LIKE ?", "%#{query}%"]) I want to put another condition here but its is proving to be...
stackexchange/codereview
I have a base class which contains an abstract/MustInherit method. I want this method to return an instance of a class which implements a given interface. When I come to implement the method in the derived class, I get a compiler error because the return types do not match (ie. in the abstract class, the return typ...
stackexchange/codereview
My understanding is that Amazon S3 is on a cloud like system and doesn't need to be backed up because they have all of that in place. Am I understanding this correctly or should I still back it up? I'm considering moving all my images to Amazon S3 instead of hosted locally on my server.
stackexchange/codereview
I try to change the read and change the position from a UILabel. This UILabel has been created in Interface Builder and now i want to read and change the position inside another class, when i call a method in the MainVieController class. But how can i do that, i've read several forums but i can't get it work. Here's al...
stackexchange/codereview
On the Windows Phone 7 device, when you run some of the standard apps (as well as the Facebook app), while the app is loading data it shows an animation of a series of dots that enter from the left and collect in the center of the screen and then exit from the right. It seems to be a standard animation that is being us...
stackexchange/codereview
GNU Hello is GNU's example project for best practices, coding standards, internationalization, configuration automation, etc. Is there a similar project that targets libraries? I realize GNU Hello can be used in that way, but would I be missing some library-specific practices? I've also searched for good tutorials on t...
stackexchange/codereview
If I bind stuff to a Control by calling the Add method of its DataBindings property, will the control's Dispose method remove the bindings automatically or do I have to remove them manually?
stackexchange/codereview
this is part of my code: // part 1 $('#igPanel .pre').html(contentsLoadHere).addClass('panelShow').removeClass('pre').attr('panelNum',panelNum); // part 2 $('<div style=" width:0; border:2px solid #FFF; float:left; color:#FFF;" class="slider pre">empty</div>').prependTo('#igPanel').animate({width:200}, function(){ ...
stackexchange/codereview
The java program need to be display for it to work, so may not use sw_hide or any hide command, how do I offset the position of the console out of the screen? Is NSIS is able to do that?
stackexchange/codereview
Possible Duplicate: Difference between ref and out parameters in .NET When to use ref and when to use out ? What is difference between the both ? How and where they are used ? Please share an example showing difference between the both ref and out . Thanks.
stackexchange/codereview
consider the following table create table sample(id, name, numeric, qno, ans1,ans2,ans3) sample data 1, 'vivek', 1, 'a', 'b', '' 2, 'vivek', 1, 'c', 'd', '' 3, 'vivek', 2, 'e', 'f', 'g' 4, 'vivek', 3, 'h', 'i', 'j' 5, 'vijay', 1, 'k', '', 'l' 6, 'vijay', 2, 'm', '', 'n' 7, 'vijay', 2, 'o', '', 'p' 8, 'vikram', 3, 'q'...
stackexchange/codereview
I have searched here, but haven't found any question related to this. I got a problem like this in mercurial: I manage open source project in bitbucket, so i have clone of the source code in my local. But I also using that project for my own live site, so I made 2 clone of bitbucket repo Bitbucket Repo | ==local_clone1...
stackexchange/codereview
1 for indexed object, such as user indexed by Id username 2 simple query, such as search by page, username 3 complex query, tag, geolocation query. Any suggestions?
stackexchange/codereview
I have got many of my questions solved here, many thanks to you guys. And I'd like to ask one more. :) I am reading about < Windows via C/C++ >, it said: When we wnat to gain access to an existing kernel object (rather than create a new one), we must speicify the operations we intend to perform on the object. If we are...
stackexchange/codereview
I have the following regular expression in Ruby: \<name\>(.+)\<\/name\> Within in if statement, like so: if line =~ /\<name\>(.+)\<\/name\>/ Is there any way to get the value of the group (.+)? Thanks in advance!
stackexchange/codereview
Hi!I have used UIBarButton Image but i have got such kind of issue.i mean Image+button on backside.for that i have written code below. UIBarButtonItem *btnMap = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"mapbutton.png"] style:UIBarButtonItemStylePlain target:self action:@selector(btnMapClicked:)]; ...
stackexchange/codereview
This is my script : window.onload = function (){ var title = document.getElementsByTagName('h1')[0].id = "heading1"; document.getElementById(title).onclick = function (e){ var para = this.nextSibling.style.display = 'block'; var newVal = (para == "block") ? "none" : "block"; ...
stackexchange/codereview
Given three POM files: C depends on B. B inherits from A. I can build A and B C fails to build because of its dependency on B. The full source-code and build output is included below for your review. Here is A's POM: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instan...
stackexchange/codereview
using c#/winforms, I used the designer view to add a datagridview control to the form and set it up... It can successfully read from the remote database :) but I need for it to be able to update the database too, for example, when I add new rows or edit/remove existing ones. How can this be done? Thanks, and any help i...
stackexchange/codereview
Is anyone using HTML5 notifications in practice, and is there any value in doing so? From my understanding it's limited only to Chrome, and so I can't imagine people jumping on this thing.
stackexchange/codereview
I have a nice little app using jCrop and now its broken on the iPad and iPhone. Has anyone any experience getting jCrop working on a touch device and if so any help/samples would be appreciated.
stackexchange/codereview
I have this code: $(document).ready(function() { var number = 10; var offset = 10; var page_number = 2; /* Bind the scroll function to an event */ $(window).bind('scroll', function(e) { /* If the scroll height plus the window height is more than the document height minus ...
stackexchange/codereview
Am having a problem accessing the data in a HashMap. It was created in one class and is being called from another. See below; Created public class LoadDatabase { public Map virusDatabase = new HashMap(); ... public void toHash(String v_Name, String signature) { virusDatabase.put(v_Name, signature); ...
stackexchange/codereview
I am attempting to open a secure socket using the TLS protocol. Looking at the records sent between client and server, I am able to progress through ClientHello, ServerHello, Certificate (server), ServerHelloDone, ClientKeyExchange, and ChangeCipherSpec (client). However the server fails to decrypt the client's Finishe...
stackexchange/codereview
I just found out I can write "{@value}" in the comment of a public static final field to insert the actual field value into the comment. Example: /** The value of this field is {@value}. */ public static final int someField = 3 In Eclipse, this comment is displayed as "The value of this field is 3". Another trick is t...
stackexchange/codereview
Does anyone know why this isn't working? any source code changes would be great. <% foreach (var i in Model.talentImages) { %> <div style="padding:15px;"> <img src="<%: i.uri %>" width="95" height="84" alt="" style="float:left; padding:0px 20px 0px 0px" /> ...
stackexchange/codereview
I want to echo the results in a different part of the page and not just in the header. How do I do this? What if I want to 6 items to be echoed separately? <?php require_once 'facebook.php'; $appapikey = 'CENSORED'; $appsecret = 'CENSORED'; $facebook = new Facebook($appapikey, $appsecret); $user_...
stackexchange/codereview
I often hear the phrase, guards are just syntactic sugar for if-then-else (or case statements). Can somebody please desugar the following instance: halfOf :: Int -> Int halfOf x | even x = div x 2 (The function is intentionally partial) Thanks,
stackexchange/codereview
I'm running a query on a table that contains values, some of the form "jsFunc('H:\\directory\\subdir\\whatever.ext')", others of the form "jsFunc('\\\\ServerName\\directory\\subdir\\whatever.ext')" along many other random strings items. I want to select anything with the form "H:\\directory\\subdir" heres my query... S...
stackexchange/codereview
In C#, variables and other things can be named protected names such as "class" by prepending the name with an @ sign. So, @class is a valid name. Is it possible to do this same thing in PHP? I am using a class of constants to simulate an enum for HTML attributes such as ID, and Class. For now I am using "CssClass" but ...
stackexchange/codereview
i write a method to create a form(3 buttons and a textBox), then i call it in main. but when i run program, before i enter information in the form (method form6 ), Other commands that are executed! "s4 and ontname chenged in the form". this is a part of my code::::::::::: ////////////////////////////////////////////...
stackexchange/codereview
I have queries using microsft access 2007 and vb.net. If I tried to execute it in microsoft access manually then the result was fine. But using code in vb.net I the result I've got was all the same Please help... here is the code "SELECT " & _ "amount as sss_loan_amount," & _ "(SELECT amount FROM pr_deduction " ...
stackexchange/codereview
I am trying to get my IEventAggregator to allow me to publish and event in one module and catch it in another. I have tried my code below in a single module/project and it works great. It only fails when I have one module/project publish the event and another subscribe to it. I have having my IEventAggregator injecte...
stackexchange/codereview
I have old database at one windows dedicated server and now i buy a new linux dedicated server with php and mysql. I plan to using php to pull out database from ms sql server row by row and put it to mysql database. But problem is mysql using utf8_unicode_ic and i don't know which charset MS SQL server used. THanks for...
stackexchange/codereview
Am I doing anything wrong in this following program? Code #include <stdio.h> int main() { long x=1290323123123; int len = snprintf(NULL,0, "%ld", x); printf("%ld %ld",x,len); return 0; } Output: 1832934323 10
stackexchange/codereview
Is query caching/entity caching are related to both 1st and 2nd level caches or just to 2nd level cache? Which is coming by default: query caching or entity caching?
stackexchange/codereview
Can anyone point me to a link to download the Power Pack mentioned at http://msdn.microsoft.com/en-us/library/aa289491(VS.71).aspx? I'm aware that there is a later version, i need this one. Unfortunately, the Gotdotnet websites where this was hosted are not longer available. Thanks in advance, Richard Thomas
stackexchange/codereview
Why can I do char identifier[4] = {'A', 'B', 'C', 'D'}; and not char identifier[4]; &identifier = {'A', 'B', 'C', 'D'}; // syntax error : '{' ? And why can I do char identifier[4] = "ABCD"; // ABCD\0, aren't that 5 characters?? and not char identifier[4]; &identifier = "ABCD"; // 'char (*)[4]' differs in levels of i...
stackexchange/codereview
I just created a stored procedure to insert data into a table after performing some calculations. My create procedure code is below: ALTER PROCEDURE [dbo].[myStoredProc] @log_id INT, @job_nm VARCHAR(20), @feed_in_out_ind CHAR(1) = null, @process_dt DATETIME = null, @procedure_dt DATETIME = NULL, ...
stackexchange/codereview
i have created a resource file "Resource.resx" in my project and added some values against some keys(string values) now when i try to access the value i get the following error... Could not find any resources appropriate for the specified culture (or the neutral culture) on disk. baseName: Resource locationInfo: fileN...
stackexchange/codereview
Basically, is there a command in droid that will allow me to check the time on the user's phone and have it returned? Where I can then assign the time to an int? Thanks!
stackexchange/codereview
Is it possible to add a loop timer to the console as calling updateTime() every 100ms? I found sequencer.addMetaEventListener(this); is probably for MIDI or audio only.
stackexchange/codereview
After adding a UIImageView to Interface Builder and assigning a png filename to it, is there a shortcut key to use the PNG's dimension (width and height) as the UIImageView's dimension? Thanks!
stackexchange/codereview
I need to trap the "Shut Down Windows" dialog that appears when you press the power button in Windows XP. I'm using a custom GINA to trap security and logon dialogs, but the "Shut Down Windows" dialog is not a GINA dialog. What Windows mechanism creates this dialog and is there a "ginastub"-style solution to displayin...
stackexchange/codereview
I have a situation where the database has a one-to-one relationship between two tables which together clearly represent the same logical entity. I would like to map these tables to the same class, and have properties of the class map to fields from BOTH tables. (I.E. rather than have one class compose another). So if t...
stackexchange/codereview
I have some javascript that fires off about 100 calls to a php script. the php script uses up a lot of memory and takes a few seconds to complete, then returns a json response of pass or fail. I don't want the ajax calls to be asynchronous as the server would come to a grinding halt running 100 instances of itself, so...
stackexchange/codereview
I have a string like: "GOOG",625.00,"-1.95 - -0.31%" I'm using this pattern, and it isn't matching. I'm trying to get GOOG. What am I doing wrong? Pattern pattern = Pattern.compile("^\"([^\"]+)"); Matcher matcher = pattern.matcher(line); if (matcher.matches()) { Log.i(TAG, matcher.group(0)); } else { Log.i...
stackexchange/codereview
How do you send a parameter to an anonymous function in scala, i'm trying to translate this from scheme (cdr (map (lambda (x) (* x x)) somelist ) i know cdr is just .tail and that an anonymous function is like (x: Int) => x * 2, 9 any help appreciated.
stackexchange/codereview
This is almost exactly what I'm looking for, only would like to find a VB.net solution instead of C#: jQuery Draggable, Droppable, ASP.NET MVC I have draggable jquery accordions on a page. When the user drags to change the panel order, I want the changed order to be saved in the database so when they come back later, t...
stackexchange/codereview
I need a select to return Month and year Within a specified date range where I would input the start year and month and the select would return month and year from the date I input till today. I know I can do this in a loop but I was wondering if it is possible to do this in a series selects? Year Month ---- ----- 20...
stackexchange/codereview
Newbie question: Can one substitue commands, properties or methods for NSStrings or char at runtime? Lets say I do something like this: //these are the names of my properties of an NSObject I created char theChangingProperty[17][18] = {"name", "title", "number", "property4", "property5", "property6", "property7", "prop...
stackexchange/codereview
I read an article stating that GPU are the future of supercomputing. I would like to know what are the programming languages used for programming on GPU's
stackexchange/codereview
I'm creating a website in wordpress. I have a music player in it as its for a music artist. But I want the player to continue playing while the users move through the website. I dont want to use iframe as i want the url updated so the page can be bookmarked. Or is there any way to update the url and use iframe?
stackexchange/codereview
I am currently making a file manager system I store all the folders names and files in the database (MySQL)I am trying to add folders in the database and then add sub folders to them,I wanted it to show all the folders to show in there correct position, Here is a eg: Folder1 Folder1-Sub1 Folder1-Sub1-Sub1 ...
stackexchange/codereview
I want to find which elements of two arrays make the two arrays different. For example, if I start off with known_unacceptable_array = [bad, bad, good, good, good, bad, good] known_acceptable_array = [] and an array is only unacceptable if there's three bads (but I don't know that at the time), but I'm able to evaluat...
stackexchange/codereview
Snippet: ax = Axes3D(self.fig) u = np.linspace(0, 2 * np.pi, 100) v = np.linspace(0, np.pi, 100) x = self.prop * np.outer(np.cos(u), np.sin(v)) y = self.prop * np.outer(np.sin(u), np.sin(v)) z = self.prop * np.outer(np.ones(np.size(u)), np.cos(v)) t = ax.plot_surface(x, y, z, rstride=6, cstride=6,color='lightgreen',...
stackexchange/codereview
Is it possible to have a button that doesn't post back to the server, and the click event can be detected by jquery? I have an MVC page that takes a while to load and access a database and i just want to reduce the number of loads required and db hits.
stackexchange/codereview
I have an implementation question. I am trying to have a rectangle change color based on the position of four sliders. (Alpha, Red, Green, Blue) I am attempting to use a dependency property to combine all four values, convert them to a brush, and apply the brush to a rectangle. First question is, is it possible to do t...
stackexchange/codereview
I have a ListBox for a few items, and I need to be able to click them. Problem is, the SelectionChanged event doesn't get fired when I click on the item's text, only if I click on the blank part. I'm quite new to WPF, and I don't understand why this is happening. XAML: <ListBox Name="lBoxVouchers" BorderThickness="0" F...
stackexchange/codereview
I'm displaying some HTML content in my iPhone app using a UIWebView. I have an image link, and I want it to change when the user touches it - at the moment the user puts a finger on the screen, rather than waiting until they lift their finger back off. What CSS or JavaScript concept could accomplish this? I've looked...
stackexchange/codereview
I have a throbber that is to appear when a user clicks a link. The problem is is that that same link can be clicked and dragged to be rearranged. In this case, I wouldn't need the throbber to appear. It only needs to appear if its actually waiting to go somewhere. How can I, with jQuery, create an event listener that w...
stackexchange/codereview
Writing an application for a client that is very photo focused. Users will be uploading hundreds of images to their account. These images are only accessible to the owners. Our first thought was to throw them all out on AmazonS3 but after doing some research we have found that accessing protected files on S3 is too ...
stackexchange/codereview
I am running Firefox 4 beta for testing, and unfortunately Google hasn't updated their Gears extension for Firefox 4. At this point, it even seems that Google might not update Gears for Firefox 4. Do you guys know of any trick to get Gears to run on Firefox 4? (For reference, here is where you can download the OS X XPI...
stackexchange/codereview
I started using Adobe Stratus yesterday and made a simple chat application. Today, I was to learn how to use the group feature. But when I try to instantiate a GroupSpecifier variable, I get this error: 1046: Type was not found or was not a compile-time constant: GroupSpecifier. P2P.mxml Earlier I was getting a sim...
stackexchange/codereview
Both of these plugins require Vim to be compiled with Ruby support, need to be compiled themselves using the same version of Ruby, etc. Is there a plugin which does the same job, but doesn't require installation other than dropping it into vimfiles directory? UPDATE: These plugins allow to open files/buffers by typing ...
stackexchange/codereview
I'm trying to use the JQuery Autocomplete, but I guess I am having trouble getting the format it expects from my handler. Here is what the handler does. This was in another SO question.... context.Response.ContentType = "text/plain"; var companies = GetCompanies(); //This returns a list of companies (List<string>) ...
stackexchange/codereview
I am trying to set up a sinatra app inside my Rails 3 (v3.0.1) application, but having no success. Sinatra gem (v1.1.0) is setup using bundle install. Here's what i have. customer_app.rb class in lib directory - class CustomerApp < Sinatra::Base get "/test" do "Hello World" end end my routes.rb file contain...
stackexchange/codereview
Here is the code I'm using to collect the posts: $Pages = wp_list_pages('title_li=&echo=0&depth=1&exclude=39,190'); $InnerPages = wp_list_pages('child_of='.($post->post_parent != false ? $post->post_parent : $post->ID).'&title_li=&echo=0'); $Title = ($post->post_parent != false) ? trim(get_the_title($post->po...
stackexchange/codereview
Is it possible to obtain the sender IP and (dynamically obtained) port with C sockets? I have the following: memset(&hints, 0, sizeof hints); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; if ((rv = getaddrinfo(NULL, DATABASEPORT, &hints, &servinfo)) != 0) { fprintf(stderr, "getaddrinfo: %s\...
stackexchange/codereview
I like to have a h3 title with a little caracter that say "expand me" it will look like that : category xyz [+] i like a function in jquery to chage/remove the + to minus when click.. i know how to append text to string but not how to remove it or just a part.. if you have a better approch feel free to tell me.. thanks...
stackexchange/codereview
How do i include two .h/class files that both have #include "h_file.h"? both require the .h file definitions, and both are included in the main program. how do i prevent the redefinition of the .h definitions (which causes the compiler to not compile)? i have: main.cpp class1.h/class1.cpp class2.h/class2.cpp h_file.h
stackexchange/codereview
All, While going through some of the files in Java API, I noticed many instances where the looping counter is being decremented rather than increment. i.e. in for and while loops in String class. Though this might be trivial, is there any significance for decrementing the counter rather than increment?
stackexchange/codereview
What is the best way to convert a double to an int? Should a cast be used?
stackexchange/codereview
I've been using Red5 0.9.0.1, and im trying to disconnect a flash client app from my red5 server app. I've achived to manually disconnect the client by using close(); on my flash app. but I cant just achieve to disconnect the user when the user closes the windows explorer, or the user looses its internet connection. an...
stackexchange/codereview