Search Results

Search found 2579 results on 104 pages for 'mike peshka'.

Page 81/104 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • How can I send an std::vector<std::string> over a UNIX socket?

    - by Mike
    For my application, I need to be able to send an std::vector<std::string> over a UNIX socket(local), and get a copy of the vector on the other end of the socket. What's the easiest way to do this with O(1) messages relative to the size of the vector(i.e. without sending a message for each string in the vector)? Since this is all on the same host, and because I control both ends of the socket, I'm not concerned with machine-specific issues such as endinness or vector/string representation.

    Read the article

  • Django limit access by group only

    - by Mike
    I only you can limit what a user can do via the user permissions in admin.. But is there a way to limit them in admin via what group you add them to? I want to allow a certain group to do everything in that model if they belong to a certain group thanks!

    Read the article

  • java nested for() loop throws ArrayIndexOutOfBoundsException

    - by Mike
    I'm working through a JPanel exercise in a Java book. I'm tasked with creating a 5x4 grid using GridLayout. When I loop through the container to add panels and buttons, the first add() throws the OOB exception. What am I doing wrong? package mineField; import java.awt.*; import javax.swing.*; @SuppressWarnings("serial") public class MineField extends JFrame { private final int WIDTH = 250; private final int HEIGHT = 120; private final int MAX_ROWS = 5; private final int MAX_COLUMNS = 4; public MineField() { super("Minefield"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container mineFieldGrid = getContentPane(); mineFieldGrid.setLayout(new GridLayout(MAX_ROWS, MAX_COLUMNS)); // loop through arrays, add panels, then add buttons to panels. for (int i = 0; i < MAX_ROWS; i++) { JPanel[] rows = new JPanel[i]; mineFieldGrid.add(rows[i], rows[i].getName()); rows[i].setBackground(Color.blue); for (int j = 0; j < MAX_COLUMNS; j++) { JButton[] buttons = new JButton[i]; rows[i].add(buttons[j], buttons[j].getName()); } } mineFieldGrid.setSize(WIDTH, HEIGHT); mineFieldGrid.setVisible(true); } public int setRandomBomb(Container con) { int bombID; bombID = (int) (Math.random() * con.getComponentCount()); return bombID; } /** * @param args */ public static void main(String[] args) { //int randomBomb; //JButton bombLocation; MineField minePanel = new MineField(); //minePanel[randomBomb] = minePanel.setRandomBomb(minePanel); } } I'm sure I'm over-engineering a simple nested for loop. Since I'm new to Java, please be kind. I'm sure I'll return the favor some day.

    Read the article

  • Best way to password protect a site? .htacess

    - by Mike Lawsom
    I created/edited a .htaccess file and I got my site password protected fine. Question though: Is there such thing as a URL key? Maybe I'm wording that incorrectly, but I would like to keep my site hidden, but be able to send out a specific URL that can view the site. What's the best way to accomplish this? Thanks in advance.

    Read the article

  • C++ split string

    - by Mike
    I am trying to split a string using spaces as a delimiter. I would like to store each token in an array or vector. I have tried. string tempInput; cin >> tempInput; string input[5]; stringstream ss(tempInput); // Insert the string into a stream int i=0; while (ss >> tempInput){ input[i] = tempInput; i++; } The problem is that if i input "this is a test", the array only seems to store input[0] = "this". It does not contain values for input[2] through input[4]. I have also tried using a vector but with the same result.

    Read the article

  • Google Visualization Spacing

    - by Mike
    I have a chart similar to the one below using the Google Visualization API. My problem is that on the right side of where the key is for this chart(where it says low, medium, high) there is too much white space. How can I get rid of this white space?

    Read the article

  • Content inside div unclickable

    - by Mike
    Hi, I have a div and I have content inside of it. When I make this div position:relative; it renders all the content inside unclickable only in IE7. When I change it to absolute, static or fixed it works again. Only happens in IE7. Anyone know why? Thanks

    Read the article

  • resource embedding in asp.net

    - by Mike
    I have a project which needs to generate PDF documents. I am using iTextSharp. I have a pdf which needs to be read and then appended to. To read the pdf document, I'm using PdfReader(), which accepts many forms, but I can't figure out how to reference a pdf in my webapplication to PdfReader. My host does not allow Binary Serialization (apparently that's bad), so I don't think I can load from an embedded resource. I've tried just using PdfReader("report.pdf"), but it keeps throwing an exception telling me that the file isn't found. I've tried putting the file in the bin directory, root directory, in the same directory as the class, but this still doesn't work. It works if I use a fully qualified path to the pdf document, but I can't use that when I upload it to my hosting provider. Does anyone have any suggestions on how I should do this? Thanks

    Read the article

  • iPhone Accelerometer Values

    - by Mike
    My question is about the iPhone accelerometer. Does the accelerometer measure acceleration or movement of the iPhone? What I mean is if I hold the iPhone and go from 0mph to 60mph, I would expect the measure of acceleration to increase in value from 0 to 60, but once I reach 60, I expect the value to return to 0 since I am "no longer accelerating" but am moving at a constant speed. Now if the accelerometer measure motion, I would expect it to register 0 to 60 and continue to provide a change in value as I move forward at 60mph. Sorry, I looked at a few books, programmed some code (values seemed to small to give a recognizable result over short distances or speeds), and a lot of web searches, and I am trying to get an answer to this question. Thanx!

    Read the article

  • knockout.js with optionsValue and value

    - by Mike Flynn
    Is there a way to keep the value binding to the object, but have the optionsValue be a property on the object. As of now if I specify both, the optionsValue property that is selected will populate the value binding. Id like to keep the object intact in the observable, but specify what value to be set in the select list value. This way a form submit will send the optionsValue I chose. @Html.DropDownListFor(q => q.DivisionId, new SelectList(Enumerable.Empty<string>()), new { data_bind="options: divisions, optionsText: 'Name', optionsValue: 'Id', value: division, optionsCaption: ' - '" }) function AddCrossPoolGameDialog() { var self = this; self.divisions = ko.observableArray([]); self.division = ko.observable(); self.awayDivisionTeams = ko.computed(function () { var division = ko.utils.arrayFirst(self.divisions(), function(item) { return self.division.Name() == item.Name; }); if (division) { return division.DivisionTeamPools; } return []; }); }

    Read the article

  • What is the standard way of using a sitemap with pages that require specific information passed to t

    - by Mike
    Hi, I have a website for which many pages rely on information passed to them (usually in the form of a querystring) or on a session variable. When making a web application, how do you normally handle these particular pages in regards to the sitemap? If you're using the standard ASP.NET menu control, it will render the node on the menu and if you click it, you could get an exception stating that a session variable doesn't exist (if it hasn't been created yet). For example, if you're making a user management area: All of these nodes get rendered, but I don't want the user to click on edit user or delete user without specifying someone to edit or delete. Any tips or suggestions would be greatly appreciated.

    Read the article

  • Change axes of google chart without refresh?

    - by Mike Kriess
    If I was using the following: https://developers.google.com/chart/interactive/docs/gallery/annotatedtimeline Assuming I did not have the line: data.addColumn('number', 'Sold Pencils'); or anything referring to 'Sold Pencils'; How do I make it such that when the user clicks an external link 'Sold Pencils' I am able to retrieve the data and add it to the graph (without the user refreshing the page). Is there some way to redraw the graph/add the column in this way?

    Read the article

  • Is there a slick way to deploy my silverlight app and change settings programmatically?

    - by MIke S.
    I am fairly new to web development. I am at the point of deployment (for testing). I have a few places (maybe 4 places) where I had to add a URI that was non-relative into the appliation. So now, at deployment, those need to be changed. Is there a slick way of handling this? By slick I mean not manually going through the app and changing the URIs or a blanket find and replace (too risky). I only have 4 places to change now, but this could easily change and cause deployment issues. I am using a Microsoft technology stack. Silverlight, ASP.NET, RIA, etc. Development is done in Visual Studio 2010. I noticed that the web projects have a nifty transformation for the web.config...which is nice. Is there an equivalent mechanism for silverlight resources? Any other ways? Any thoughts?

    Read the article

  • asp.net datasource in memory which component suites this better?

    - by Mike
    I need to create a page that has a listbox with databound items. Upon clicking an entry in the listbox, the page will postback and insert an entry into a listview. The listview should have the item's name, and a textbox allowing the user to edit the value for each. I don't want the listview to be in "edit" mode. I just want the user to be able to update the value. Is this possible?

    Read the article

  • related categories - database design

    - by mike
    Hello! I'm looking for a little database design advice... I have a spreadsheet with a few columns in it. Column 1 being a list of categories and the rest being related categories(to the category in column 1). I'm trying to figure out what the best way to setup the tables would be... My thought so far is to have a table that just lists the categories then have a table with 2 columns that holds the id of the category and the id of a related category.... Would this be the best way to do this? Any better ideas?

    Read the article

  • C# character counter when writing to new line

    - by Mike
    Basically i'm trying to read a really big text file and when the charecters of the line reach X amount write to a new line, but i can't seem to get the charecter count to work. Any help is appricated! using (FileStream fs = new FileStream(betaFilePath,FileMode.Open)) using (StreamReader rdr = new StreamReader(fs)) { while (!rdr.EndOfStream) { string betaFileLine = rdr.ReadLine(); int stringline = 0; if (betaFileLine.Contains("þTEMP")) { //sb.AppendLine(@"C:\chawkster\workfiles\New Folder\GEL_ALL_PRODUCTS_CONCORD2.DAT"); string checkline = betaFileLine.Length.ToString(); foreach (string cl in checkline) { stringline++; File.AppendAllText(@"C:\chawkster\workfiles\New Folder\GEL_ALL_PRODUCTS_CONCORD3.DAT", cl); if(stringline == 1200) { File.AppendAllText(@"C:\chawkster\workfiles\New Folder\GEL_ALL_PRODUCTS_CONCORD3.DAT","\n"); stringline = 0; } } } } foreach (string cl in checkline) Error 1 Cannot convert type 'char' to 'string'

    Read the article

  • url.rewrite-once with Kohana and with urls

    - by mike clagg
    currently I have this setup in our simple-hosts.conf: url.rewrite-once = ( ".*.(js|ico|gif|jpg|png|css|php|htm)(?.*)?$" = "$0", "/slapi" = "/slapi/index.php" ) Works great, except the above fails when I have a dot in the query string: ?url=http://google.com My regexpy is not 1337

    Read the article

  • Storing data with a stand-alone C++ application

    - by Mike
    I work with Apache, PHP, and MySQL for web development and local applications. For the past couple of years I have slowly been learning C++ and want to build an application this summer. Specifically, I want to make a "library" application in which I can store information about the books, CDs, and records that I own. I know this type of app exists, but I want to learn C++ and this seems like a good way to go about it. Here are a few questions: Is it possible to create a stand-alone application that does not require a database for storing data? If the answer to #1 above is "yes", is it a good idea to do this for an application that could potentially need to manage a lot of data? What data-storage options would you recommend for use with a C++ application? Thanks!

    Read the article

  • Problem with deployment of windows application using setup wizard.

    - by Mike
    I have some xml files, which are used in my application. They are stored in the same folder with application , in subfolder DATA: "C:\MyProject\DATA\". To get the DATA folder path i use this code : static public string GetDataFolderPath() { string s = System.IO.Directory.GetCurrentDirectory().Replace(@"\bin\Debug", ""); int i = s.LastIndexOf(@"\"); s = s.Substring(0, i); i = s.LastIndexOf(@"\"); s= s.Substring(0, i); return s + @"\Data\"; } So when i want to deploy my application, i create a setup project, and add the DATA folder to Application folder. But after i install the program f.e. "C:\Project"(DATA folder- "C:\Project\DATA" i got the error: "folder C:\DATA is not found". What i need to change to make things working after deployment. Why it looks for the DATA folder on 1 level higher?

    Read the article

  • How can I map UIDs to user names using Perl library functions?

    - by Mike
    I'm looking for a way of mapping a uid (unique number representing a system user) to a user name using Perl. Please don't suggest greping /etc/passwd :) Edit As a clarification, I wasn't looking for a solution that involved reading /etc/passwd explicitly. I realize that under the hood any solution would end up doing this, but I was searching for a library function to do it for me.

    Read the article

  • How do I force MyEclipse to hot-deploy a JavaScript file to my JBoss instance?

    - by Mike Cialowicz
    I'm having trouble with MyEclipse 7.1.1 hot-deployment of files to my JBoss 4 server. The problem is this: while my server is running, I can make changes to various JAVA and HTML files, which are then hot-deployed immediately (I can see the changes reflected in my browser when I refresh the page). However, while working on a particular JavaScript file, my changes are not being hot-deployed. This makes it very difficult to work on and debug this file, since I have to stop my server, redeploy, and start it again each time I make changes. This is a new problem - it didn't used to happen with this file, so I think something got screwed up in my MyEclipse configuration. I've verified that my projects (JBoss 4 instances) are all set up in "Exploded" mode for hot-deployment. I'm also 99% sure that this isn't an issue with my browser, since I always refresh with CTRL+F5, and I've tried a number of things like clearing my browser cache to get the currently deployed version of the file. I've also tried doing a "clean" on the project while the server is running, and that didn't force a deployment either. Any sort of solution would be helpful. I'd love for MyEclipse to deploy the file automatically, but I'm also open to manually forcing hot-deployment of this particular file while I work on it. Thank you.

    Read the article

  • Javascript - Function call will not enter function body

    - by Mike S
    I have a function acting as a constructor that, when called, gets as far as the function definition in the debugger, but never to the function body. Is there a common reason this may happen that I am overlooking? Example code below: myconstructor.js function MyConstructor(optionalParam) { //this breakpoint gets hit var newobj = {}; //breakpoint never hit //code to check for null parameter //other code }; main.js var myConstructor = new MyConstructor(); There must be something I have overlooked, but I can't see what that is. Neither firefox/firebug nor VS report errors or warnings. Thanks!

    Read the article

  • Regex for zeroing in on build output text error

    - by Mike Atlas
    I'd like to quickly hone in on what failed in a build log output that is nearly 5k lines long, using Notepad++ as my editor for the file. Notepad++ has the nice ability to specify regular expressions, so I am wondering if there is a way to not match: Compile complete -- 0 errors, 0 warnings but to match, for example: Compile complete -- 1 errors, 0 warnings Compile complete -- 100 errors, 0 warnings where the match would be (1 or more) errors. If this isn't possible, I will probably just write a quick line-by-line parsing tool instead, but I was hoping someone on StackOverflow could whip out a regular expression in the same amount of time - I'm definitely not proficient enough with regular expressions to be able to write one for my needs in a short amount of time.

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >