Daily Archives

Articles indexed Wednesday June 11 2014

Page 4/17 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Game 30% done on HTML5. Maybe it was a bad idea. Should I change to Unity3d? [on hold]

    - by Dokkat
    I'm creating a 3d game on HTML5. It's 30% complete and the hard part is already coded. The server is on node.js.Now I'm realizing that maybe it was not a wise choice. This is because I realized: Three.js still has many bugs. I don't see the same thing on every machine. Each browser, OS, can give different results. I'm afraid my clients will have a great stress installing my game properly. I have tons of sprites and models on my game. I wonder if my clients will have to load all them again everytime they want to play? I wonder if a Node.js server will be fast enough to handle it, and I'm afraid it won't be scalable. What would you advise me? Should I continue and finish the game on HTML5 or is it better to remake it on something else, like Unity3d for the client and (what?) for the server?

    Read the article

  • Unable to export runnable jar, launch configuration grayed out

    - by user13107
    I am not able to figure out how to export a runnable jar in eclipse. I have a java project (project A) (written by someone else) which when imported in Eclipse, I can click Build Project and it will create a projectName.jar file under bin/ directory. That jar file contains binary *.class files. This jar file is added as external library for another java project (project B) which I want to debug. But because all the class files are binary I'm not able to do line-by-line debugging. I tried exporting Runnable Jar in Eclipse, for that I have to select a Launch Configuration. But there is no main class in project A. (I recursively grepped for main and didn't find any). What can I do to export jar of project A that contains respective source code also (which will be used in line-by-line debugging)?

    Read the article

  • Binding sub report in Crystal report

    - by Aijaz Chauhan
    Is it compulsory to bind sub report if we put sub report in main report ? here is my problem : code snippet : DataTable dtExtraDoc = dtDocSub.Select("DocumentId=14").Length == 0 ? null : dtDocSub.Select("DocumentId=14").CopyToDataTable(); if (dtExtraDoc != null && dtExtraDoc.Rows.Count > 0) { if (dtExtraDoc.Rows[0]["ResponceId"].ToString() == "2") { repdoc.Subreports["subRpt-extra-Doc-textile-claim-query-letter.rpt"].SetDataSource(dtExtraDoc); } } If dtExtraDoc is null then it will not bind the sub report and hence it gives me error " Object reference not set to an instance of object" I am totally new to crystal reports please help me.. Thanks in advance.

    Read the article

  • Issue pushing object into an array JS

    - by Javacadabra
    I'm having an issue placing an object into my array in javascript. This is the code: $('.confirmBtn').click(function(){ //Get reference to the Value in the Text area var comment = $("#comments").val(); //Create Object var orderComment = { 'comment' : comment }; //Add Object to the Array productArray.push(orderComment); //update cookie $.cookie('order_cookie', JSON.stringify(productArray), { expires: 1, path: '/' }); }); However when I print the array this is the output: Array ( [0] => Array ( [stockCode] => CBL202659/A [quantity] => 8 ) [1] => Array ( [stockCode] => CBL201764 [quantity] => 6 ) [2] => TEST TEST ) I would like it to look like this: Array ( [0] => Array ( [stockCode] => CBL202659/A [quantity] => 8 ) [1] => Array ( [stockCode] => CBL201764 [quantity] => 6 ) [2] Array( [comment] => TEST TEST ) I added products to the array in a similar way and it worked fine: var productArray = []; // Will hold order Items $(".orderBtn").click(function(event){ //Check to ensure quantity > 0 if(quantity == 0){ console.log("Quantity must be greater than 0") }else{//It is so continue //Show the order Box $(".order-alert").show(); event.preventDefault(); //Get reference to the product clicked var stockCode = $(this).closest('li').find('.stock_code').html(); //Get reference to the quantity selected var quantity = $(this).closest('li').find('.order_amount').val(); //Order Item (contains stockCode and Quantity) - Can add whatever data I like here var orderItem = { 'stockCode' : stockCode, 'quantity' : quantity }; //Check if cookie exists if($.cookie('order_cookie') === undefined){ console.log("Creating new cookie"); //Add object to the Array productArray.push(orderItem);

    Read the article

  • Java - Calling all methods of a class

    - by Thomas Eschemann
    I'm currently working on an application that has to render several Freemarker templates. So far I have a Generator class that handles the rendering. The class looks more or less like this: public class Generator { public static void generate(…) { renderTemplate1(); renderTemplate2(); renderTemplate3(); } private static void render(…) { // renders the template } private static void renderTemplate1() { // Create config object for the rendering // and calls render(); }; private static void renderTemplate1() { // Create config object for the rendering // and calls render(); }; … } This works, but it doesn't really feel right. What I would like to do is create a class that holds all the renderTemplate...() methods and then call them dynamically from my Generator class. This would make it cleaner and easier to extend. I was thinking about using something like reflection, but it doesn't really feel like a good solution either. Any idea on how to implement this properly ?

    Read the article

  • Jmeter- HTTP Cache Manager, Unable to cache everything what it is being cached by Browser

    - by chinmay brahma
    I used HTTP Chache Manager to Cache files which are being cached in browser. I am successful of doing it for some of the pages. Number of files being cached in Jmeter is equal to Number of files being cached by browser. But in some cases : I found number files being cached is lesser than the files being cached by browser. Using Jmeter I found only 5 files are being cached but in real browser 12 files are getting cached. Thanks in advance

    Read the article

  • based map follow layer wms tiled

    - by user32263
    hye all, im new in openlayer, just want to ask, i want to develop one system i already get layer from geoserver using wms services; this is the code: var hilirPerak = new OpenLayers.Layer.WMS("hilirPerak", "http://localhost:8080/geoserver/hilirPerak/wms", { workspace: 'hilirPerak', layers: 'hilirPerak:lot', styles:'', format: 'image/png', tiled: true, transitionEffect: 'resize', units: 'degrees' }, { maxResolution: 1000, singleTile: false, ratio:1, isBaseLayer:false, tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom, buffer: 0, visibility:true, maxExtent: OpenLayers.Bounds.fromString("3.873635,4.074956,101.14974"), //ratio: 1.9, //buffer: 0, //displayOutsideMaxExtent: true, //isBaseLayer: true, yx : {'EPSG:4326' : true}, displayOutsideMaxExtent: true, transparent:true } ); its show on system, for based map im using google, but the problem is, when i tick check layer, the based map follow size layer. if the layer point at certain place, based map follow layer bounds. please help me.. Thank you

    Read the article

  • Play video in videoplayer using ffmpeg

    - by AndroidOptimist
    I am trying to play an video using ffmpeg. For this i referred ffmpeg-sample link wherein i can play my video successfully. Here the video is getting played as a bitmap image. Now i would like to play my video in mediaplayer by pressing a single play button with ffmpeg code. I googled this but i couldn't find an answer. Can u please help me in playing the video in player using ffmpeg (not using bitmaps).

    Read the article

  • Barcode not generated in C# web forms?

    - by Sinsil Mathew
    I am trying for create a barcode in my web form.for that i download font IDAutomationHC39M and install in my system,then i run my wesite in localhost but barcode cannot be generated.This is my code protected void Button1_Click1(object sender, EventArgs e) { string barCode = TextBox1.Text; System.Web.UI.WebControls.Image imgBarCode = new System.Web.UI.WebControls.Image(); using (Bitmap bitMap = new Bitmap(barCode.Length * 40, 80)) { using (Graphics graphics = Graphics.FromImage(bitMap)) { Font oFont = new Font("IDAutomationHC39M", 16); PointF point = new PointF(2f, 2f); SolidBrush blackBrush = new SolidBrush(Color.Black); SolidBrush whiteBrush = new SolidBrush(Color.White); graphics.FillRectangle(whiteBrush, 0, 0, bitMap.Width, bitMap.Height); graphics.DrawString("*" + barCode + "*", oFont, blackBrush, point); } using (MemoryStream ms = new MemoryStream()) { bitMap.Save(ms, System.Drawing.Imaging.ImageFormat.Png); byte[] byteImage = ms.ToArray(); Convert.ToBase64String(byteImage); imgBarCode.ImageUrl = "data:image/png;base64," + Convert.ToBase64String(byteImage); } plBarCode.Controls.Add(imgBarCode); } And the result is appear like that code

    Read the article

  • Delete last line in txt file

    - by user3658127
    I wrote a foreach loop for my datagridview to write all rows to txt file. I have a problem as it adds 2 empty lines at the end, as 1 row is full of empty cells after adding/reading to datagrid view. Is there any way to omit the last line or delete it in txt? foreach (DataGridViewRow item in this.DB.Rows) { foreach (DataGridViewCell item2 in item.Cells) { if(item2.Value != null) filewrite.Write(item2.Value.ToString() + " "); } filewrite.WriteLine(""); }

    Read the article

  • AWK Shift empty column to left (to start position)

    - by Filip Zembol
    INPUT: fofo jojo tst fojo jofo sts rhr hrhh dodo jojo hoho jojo zozo roro vovo OUTPUT: fofo jojo tst fojo jofo sts rhr hrhh dodo jojo hoho jojo zozo roro popo NOTE: Please help me, I need to shift all rows, which have first column empty. Every fields are tab delimited. In this file some rows start from first column, but some rows start from second or third column. Thank you

    Read the article

  • Line graph disappears after new line is added

    - by tonystinge
    I am having trouble uploading a large .csv file to my HIGHCHART graph. I've been able to graph an 85KB up to 1486 lines by 9 (I) columns. Here is an example: TimeStamp Temp_1_01 Temp_1_02 Temp_2_01 Temp_2_02 Temp_3_01 Temp_3_02 Temp_4_01 Temp_4_02 5/15/2014, 3:25 408 487 63 84 67 91 63 78 5/15/2014 3:30 408 487 63 84 67 91 63 78 5/15/2014 3:35 407 489 63 84 67 91 63 78 5/15/2014 3:40 408 488 63 84 67 91 63 78 5/15/2014 3:44 408 488 63 84 67 91 63 78 ... 5/22/2014 9:40 483 421 0 93 76 95 72 89 When I add a new line the line graph disappears. Any suggestions? Here is the javascript: $.get('Dropbox/geo/sites/GC_Room/loveland.csv', function(data) { // Split the lines var lines = data.split('\n'); var i = 0; var csvData = []; // Iterate over the lines and add categories or series $.each(lines, function(lineNo, line) { csvData[i] = line.split(','); i = i + 1; }); var columns = csvData[0]; var categories = [], series = []; for(var colIndex=0,len=columns.length; colIndex<len; colIndex++) { //first row data as series's name var seriesItem= { data:[], name:csvData[0][colIndex] }; for(var rowIndex=1,rowCnt=csvData.length; rowIndex<rowCnt; rowIndex++) { //first column data as categories, if (colIndex == 0) { categories.push(csvData[rowIndex][0]); } else if(parseFloat(csvData[rowIndex][colIndex])) // <-- here { seriesItem.data.push(parseFloat(csvData[rowIndex][colIndex])); } }; //except first column if(colIndex>0)series.push(seriesItem); } // Create the chart var chart = new Highcharts.Chart( { chart: { alignTick: false, renderTo: 'LANE_METALS', type: 'line' }, title: { text: 'Monthly Average Temperature', x: -20 //center }, subtitle: { text: 'Source: LANE METALS', x: -20 }, xAxis: { categories: categories, labels: { step: 200, text: 'Time', }, tickWidth: 0 }, yAxis: { title: { text: 'Temperature (\xB0C)' }, min: 0 }, tooltip: { formatter: function() { return '<b>'+ this.series.name +'</b><br/>'+ this.x +': '+ this.y +'\xB0C'; } }, legend: { layout: 'vertical', //backgroundColor: '#FFFFFF', //floating: true, align: 'left', //x: 100, verticalAlign: 'top', //y: 70, borderWidth: 0 }, plotOptions: { area: { turboThreshold: 0, stacking: 'normal', lineColor: '#666666', lineWidth: 1, marker: { lineWidth: 1, lineColor: '#666666' } } }, series: series }); });

    Read the article

  • How to write following MongoDB query in C# Driver?

    - by user3043457
    I wrote the exact query I need in Mongo console, but I'm having trouble rewriting it in C# driver. Here's a sample of the document, it's simple dictionary: { "_id" : ObjectId("539716bc101c588f941e2c27"), "_t" : "DictionaryDocument", "CsvSeparator" : ",", "SelectedAccounts" : "0", ... } Here's the query: db.settings.find({"SelectedAccounts" :{$exists:true}},{"SelectedAccounts":1, "_id":0} ) Now, I got the first part, Find with exists working, but how to write the second parameter in C# driver? I'd just like a single string as a result, not entire document. Here's C# code I got so far: _collection.FindOneAs(typeof(DictionaryDocument), Query.Exists(key)); key in this case is "SelectedAccounts". I'd like the query to filter and return only the data I need, I don't want to return all the results and search on the C# side. EDIT: I wouldn't mind if _id was passed back, but I don't need it. So only this part would work if it could be converted in C#: db.settings.find({"SelectedAccounts" :{$exists:true}},{"SelectedAccounts":1} )

    Read the article

  • Can't unwrap Optional.None tableviewcell

    - by Mathew Padley
    I've a table view that has a custom table view cell in it. My problem is that when i try and assign a value to a variable in the custom table view cell I get the stated error. Now, I think its because the said variable is not initialised, but its got me completely stumped. This is the custom table cell: import Foundation import UIKit class LocationGeographyTableViewCell: UITableViewCell { //@IBOutlet var Map : MKMapView; @IBOutlet var AddressLine1 : UILabel; @IBOutlet var AddressLine2 : UILabel; @IBOutlet var County : UILabel; @IBOutlet var Postcode : UILabel; @IBOutlet var Telephone : UILabel; var location = VisitedLocation(); func Build(location:VisitedLocation) -> Void { self.location = location; AddressLine1.text = "test"; } } My cell for row at index path is: override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! { var addressCell = tableView.dequeueReusableCellWithIdentifier("ContactDetail") as? LocationGeographyTableViewCell; if !addressCell { addressCell = LocationGeographyTableViewCell(style: UITableViewCellStyle.Value1, reuseIdentifier: "ContactDetail"); } addressCell!.Build(Location); return addressCell; } As I say I'm completely baffled, the Build function calls the correct function in the tableviewcell. Any help will be gratefully appreciated. Ta

    Read the article

  • dynamic memory allocation of 2d array in which columns are of different size

    - by vishal kumar
    i want to create a 2d array dynamically in c++ language. But in that 2d array columns should be of different size. i mean to say that 2d array should not be in M * N. It should be something like.... 1 2 next line 3 4 5 next line 2 3 4 5 next line 5 next line 4 5 7 I am able to create 2d array in above manner but how to display content of array continously create a problem for me. Please anyone explain me how to come up with this problem.

    Read the article

  • AngularJS recursive directive with a dynamic HTML template (bounty)

    - by Nazar Sobchuk
    I have a realy hard task here. I am working on an AngularJS web app, which is capable of sending different HTTP methods to our project's Restful Web Service and receiving responses in JSON. Basicaly it looks like this: You can create some REST resource from this application. Let's say an exam. To create an exam - you pick a resource from a list of available resources. This triggers a function, that sends a request to localhost:8080/STEP/api/explain/resorceName and gets a description for this resource. Description looks like this: http://jsonblob.com/534fc022e4b0bb44248d6460 After receiving a response - I start building input fields like follows (allFields - array of field objects for this resource, enumValues - enum values for resource's field if it's property isEnum = true): <div ng-repeat="field in allFields"> <div ng-show={{!field.isEnum}}> <p ng-show={{field.isRequired}}>{{field.name}}*: </p> <p ng-show={{!field.isRequired}}>{{field.name}}: </p> <input type="text" ng-model="updateEntityResource[field.name]" ng-change="getUpdateEntityAsText()" class="form-control" placeholder="{{parseClassName(field.type)}}"> </div> <div ng-show={{field.isEnum}}> <p ng-show={{field.isRequired}}>{{field.name}}*: </p> <p ng-show={{!field.isRequired}}>{{field.name}}: </p> <select ng-model="updateEntityResource[field.name]" ng-change="getUpdateEntityAsText()" class="form-control"> <option></option> <option ng-repeat="enumValue in field.enumValues" label={{enumValue.name}}>{{enumValue.ordinal}}</option> </select> </div> </div> Now, the problem. I need to create a recursive directive, which would be capable of generating fields in such maner as described above for every resource's field that has "restResourceName" not null. To get all it's fields you just send a request to localhost:8080/STEP/api/explain/restResourceName and get similar JSON response as shown above, which is then used to build HTML elements for inputing values into model. Does anyone know how this can be achieved using angular recursive directive? Every useful answer is highly appreciated and evaluated. The correct answer will get +50 or I will start a bounty, because I'm realy stuck with this for 2 days. If you need any additional info - let me know. Thank you.

    Read the article

  • how to load local html file into uiwebview iphone

    - by madcoderz
    I'm trying to load a html file into my UIWebView but it won't work. Here's the stage: I have a folder called html_files in my project. Then I created a webView in interface builder and assigned an outlet to it in the viewController. This is the code I'm using to append the html file: -(void)viewDidLoad { NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"html" inDirectory:@"html_files"]; NSData *htmlData = [NSData dataWithContentsOfFile:htmlFile]; [webView loadData:htmlData MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:@""]]; [super viewDidLoad]; } That won't work and the UIWebView is blank. I'd appreciate some help.

    Read the article

  • node.js: encrypting data that needs to be decrypted?

    - by fancy
    We are using bcrypt for passwords and data that never needs to be decrypted. What should do to protect other user information that does. For this example lets say that we didn't want a users real name to be in plain text in case someone was to obtain the db. This is somewhat sensitive data but also needs to be called from time to time and displayed in plain text. Is there a simple way to do this?

    Read the article

  • How do you install a new build controller in TFS?

    - by JL.
    I am not looking for detailed instructions, I just want the quick and dirty overview. We have an existing TFS infrastructure, I am looking to install a new build controller for 1 team project. Do I need to create a new VM and install TFS (configure as controller) and then link it from the VM to the main TFS instance? OR Do I need to create the new VM, install TFS (configure as controller) and then - From the main TFS admin console on the main TFS server - add the new controller? Thanks in advance?

    Read the article

  • Cisco RV016 dual WAN and VPN setup

    - by sklr
    I have a VPN of several RV016 routers and I want to set some of them with 2 ISPs. I plug the two ISP cables in WAN 1 and 2 ports and configure the router to "Intelligent Balancer(Auto Mode)". It works ok like that, but the VPNs that I set use the public IP of the provider. For example if I have 5 VPNs set for ISP1 (WAN1) and the balancer sends the request trough WAN2 it can't use any of the configured VPNs because the public IP is different. How do I deal with this problem?

    Read the article

  • Very High Network out in ec2 instance

    - by Jatin
    I launched an ubuntu-14.04-64bit instance in Amazon EC2 two days back. And I started Tomcat 7.0.54 in that instance and deployed my application war files. It has no other software installed other than tomcat and the default ones. In the past 2 days, its shows 858 GB of Data Transfer(Network Out) from that instance. I have attached a graph of Amazon CloudWatch Metric "Network Out" My application does not do any data download/upload. Its a Java Spring application and the front end is in HTML&Javascript. My application traffic was very low (less than 20 hits) in those 2 days. Is there a way to find out why these data transfers happened and also to find what data has been transferred. If you can see in graph, network out was 20gb per minute. Some more info: Network in was negligible CPU Utilization was very high Everything else was low

    Read the article

  • Overrideen ASPNet.config does not apply for legacyImpersonationPolicy

    - by Grumbler85
    I tried to override the <legacyImpersonationPolicy> Element, so a single application, will enable this policy (which is necessary, since this application breaks if disabled). So my Framework64/aspnet.config states: <configuration> <runtime> <legacyUnhandledExceptionPolicy enabled="false" /> <legacyImpersonationPolicy enabled="false" /> <alwaysFlowImpersonationPolicy enabled="false" /> <SymbolReadingPolicy enabled="1" /> <shadowCopyVerifyByTimestamp enabled="true"/> </runtime> <startup useLegacyV2RuntimeActivationPolicy="true" /> </configuration> And a local aspnet.config file has this change: <legacyImpersonationPolicy enabled="false" /> Procmon tells me the file is read by the w3wp.exe, but the settings will not apply. Can anyone point out a way how to correctly override the setting? *The Server has been restarted meanwhile, but still no changes.

    Read the article

  • SQL Server 2012 LocalDB

    - by user3061846
    I´m a noobie so please be patient ! I developed an app using C# and SQL Server Express 2012 with a local database, my connection string is"Data Source=localhost ; Initial Catalog = scalnet ; Integrated Security=SSPI; Trusted_Connection=Yes"; Everything worked ok till the time I made a setup and tried to install my app in another computer. My first question is: - What version of SQL should I install is this machine? it should be as ligth as possible. - I tried to install SQL exprees 2012 but it gives me an error when I execute my app "A network related or instance specific error occurred while establishing a ..... (provider:Named Pipes Provider, error:40 - Could not open a connection to SQL server." This probably should be a problem with the server configuration but I have no ideia how to solve this... Can anyone point me to the rigth direction ? ? Thanks

    Read the article

  • DreamPress WordPress site Varnish Cache Error

    - by rhand
    Every now and then, often when I write a post on my Dreamhost DreamPress WordPress blog I get this Varnish related error: Error 503 Service Unavailable Service Unavailable Guru Meditation: XID: 180706672 Varnish cache server I did a related post here Varnish & ISPConfig under Debian give error 503 but they only tell me it could be an Apache Virtual Hosts issue and that the defined hosts should be checked. But that thread was on a different XID and just a comment, not an accepted solution. So perhaps this situation is different. Any ideas?

    Read the article

  • Postgres - could not create any TCP/IP sockets

    - by Jacka
    I'm running a rails app in development with postgresql 9.3. When I tried to start passenger server today, I got: PG::ConnectionBad - could not connect to server: Connection refused Is the server running on host "localhost" (217.74.65.145) and accepting TCP/IP connections on port 5432? No big deal I thought, that happened before. Restarting postgres always solved the problem. So I ran sudo service postgresql restart and got: * Restarting PostgreSQL 9.3 database server * The PostgreSQL server failed to start. Please check the log output: 2014-06-11 10:32:41 CEST LOG: could not bind IPv4 socket: Cannot assign requested address 2014-06-11 10:32:41 CEST HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2014-06-11 10:32:41 CEST WARNING: could not create listen socket for "localhost" 2014-06-11 10:32:41 CEST FATAL: could not create any TCP/IP sockets ...fail! My postgresql.conf points to the defaults: localhost and port 5432. I tried changing the port but the error message is the same (except the port change). Both ps aux | grep postgresql and ps aux | grep postmaster return nothing. EDIT: In postgresql.conf I changed listen_addresses to 127.0.0.1 instead of localhost and it did the trick, server restarted. I also had to edit my applications' db config and point to 127.0.0.1 instead of localhost. However, the question is now, why is localhost considered to be 217.74.65.145 and not 127.0.0.1? That's my /etc/hosts: 127.0.0.1 local 127.0.1.1 jacek-X501A1 127.0.0.1 something.name.non.example.com 127.0.0.1 company.something.name.non.example.com

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >