Daily Archives

Articles indexed Thursday October 11 2012

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

  • Track sales and commission with third-party tool

    - by Andrew
    I have a clothing website where I link to various clothing retailers. I have reached an agreement with one of the retailers whereby they will pay a commission to us for every sale they make from traffic that was referred by our site. I need a mechanism for tracking how much commission should be paid to us, that involves as little work as possible to implement from their side. We both have Google Analytics. Option 1: They record a goal in their GA account whenever someone makes a purchase on their site. They see how many completed goals are marked as referral traffic from our site and calculate commission accordingly. The problem with this is that the whole process of calculating and paying commission will be manual. They will need to frequently check how many sales were generated by referral traffic from our site, and probably we will have to chase them for commission payments. Also - since we won't have access to their GA data - we will need to trust that they report all sales accurately. Option 2: Sign them up to an affiliate network like Commission Junction or Google's Affiliate Network, and connect to them through this network. The problem with this solution is that it seems too heavyweight; ideally we don't want to ask a retailer to go through the whole sign up process just to deal with us and pay us commission. I am assuming that there must be some lightweight service that tracks the number of sales by one site and pays commission accordingly to the other site, where the sign up and installation procedure is simple and fast.

    Read the article

  • FTP client says directory permissions are 0000

    - by nnnmmm
    I encountered a problem that appears to be related to permissions (same as this one). When I looked at the permissions of various directories in FireFTP, they all were 0000, which is obviously nonsense, since all the other pages are served without any problems. I only have ftp access, and I think it’s a Windows server (The header says "Server: Microsoft-IIS/7.5"). I’ve tried a different ftp client, with the same result. Changing the permissions results in a "'SITE CHMOD 764 [directory]': command not understood" error. A search on Google and SO for "permissions windows 0000" and similar queries didn’t turn up anything. How can I view and change the actual permissions?

    Read the article

  • Upload ICS (calandar) file to my server

    - by IEnumerable
    I want to upload my ICS file to my server, well this is the easy part. What I really want is to be able to share this *.ics file with 2-3 people so they can edit. I have currently uploaded the file on the www/ (root) mydomain.com.au/myfile.ics of my server and added it to my Email/Cal client. Was all looking ok until I tried to save changes. Can someone please direct me to some documentation on how I do this properly. The easy solution would be to upload to google, but I would rather learn how to manage the file myself. Thank you

    Read the article

  • Universal navigation menu across domains - would it be considered duplicate content?

    - by Jon Harley
    Across different sites on different second-level domains exists a universal navigation bar with a collection of roughly 30 links. This universal bar is exactly the same for every page on each domain. The bar's HTML, CSS and JavaScript are all stored in a subfolder for each domain and the HTML is embedded upon serving the page and is not being injected on the client side. None of the links use any rel directives and are as vanilla as can be. My question is about Google's duplicate content rule. Would something like this be considered duplicate content? Matt Cutt's blog post about duplicate content mentions boilerplate repetition, but then he mentions lengthy legalese. Since the text in this universal bar is brief and uses common terms, I wonder if this same rule applies. If this is considered duplicate content, what would be a good way to correct the problem?

    Read the article

  • problem connecting to magento connect

    - by amir
    I'm using magento 1.4.0 and when I try to get to magento connect and download a plugin the page will say Error: Please check for sufficient write file permissions Your Magento folder does not have sufficient write permissions, which this web based downloader requires. If you wish to proceed downloading Magento packages online, please set all Magento folders to have writable permission for the web server user (example: apache) and press the "Refresh" button to try again. does anyone know how I can fix this problem, thanks Update: the plugin I'm trying to use is MagentoPycho light box so I unpacked the folder into the app/code/local but it still doesn't show in the admin area

    Read the article

  • Game based on Ajax polling for 12 players

    - by Azincourt
    I am planning on writing a small browser game. The webserver is a shared server, with no root / install possible. I want to use AJAX for client/server communication. There will be 12 players. So each player would be polling the server for the current game status every X milliseconds (let's say 200ms). So that would be 200ms x 12 players x 5 = 60 requests per second Can Apache handle those requests? What might be the bottlenecks when using this attempt?

    Read the article

  • Crash due to removal of Elements like CCSprite from NSMutableArray

    - by mayuur
    So, here's how it goes. I am currently working on Cocos2d game, which consists of many Obstacles. One obstacle gets added on the screen at an interval of 10 seconds like this. ObstacleSprite* newObstacle = [ObstacleSprite spriteWithFile:@"Obstacle.png" rect:CGRectMake(0, 0, 20, 20)]; newObstacle.position = ccp(mainPlayer1.position.x,10); [self addChild:newObstacle]; [self.arrayForObstacles addObject:newObstacle]; Now, I insert these obstacles into the arrayForObstacles because I also want to keep checking whether the Obstacles and MainPlayer don't collide. I check it with the help of this function. - (void) checkCollisionWithObstacle { if(mainPlayer1.playerActive) { for(int i = 0; i < [self.arrayForObstacles count]; i++) { ObstacleSprite* newObstacle = [self.arrayForObstacles objectAtIndex:i]; if(newObstacle != nil) { if(CGRectIntersectsRect([mainPlayer1 boundingBox], [newObstacle boundingBox])) { mainPlayer1.livesLeft--; } } } } } THE ISSUE Problem is when I get to certain score, one of the Obstacles gets deleted. Removal of Obstacles works as in First In-First Out (FIFO) mode. So, to delete obstacles, I write the following method : - (void) keepUpdatingScore { //update new score mainPlayer1.score+=10; //remove obstacle when score increases by 5k if(mainPlayer1.score > 5000 && mainPlayer1.score > 0) { mainPlayer1.playerActive = NO; if([self.arrayForObstacles count] > 0) { CCLOG(@"count is %d",[self.arrayForObstacles count]); ObstacleSprite* newObstacle = [self.arrayForObstacles objectAtIndex:0]; [self.arrayForObstacles removeObjectAtIndex:0]; [self removeChild:newObstacle cleanup:YES]; CCLOG(@"count is %d",[self.arrayForObstacles count]); } } else { } } It crashes when score crosses 5000 mark! UPDATE Crash happens when it again goes to the method checkCollisionWithObstacle. This is the THREAD Look. THis is the line Which crashes.

    Read the article

  • Creating a newspaper that effects the game's economy?

    - by zardon
    I am writing a game in Objective C/cocos2d where a newspaper is a central part of what controls or rather effects the game's world economy as well as what a city might do (such as increase X, reduce Y) The newspaper is a bit like a "Chance card" in Monopoly, it has an effect on something. My question is, what is the best way to do write a newspaper that has both a random and specific effect within the game. Would the best strategy be to write out all the things a newspaper can affect, a PLIST of headlines (with placeholders). I think Tiny Tower uses a PLIST of events and it randomly picks an event, but I'm not sure how it actually parses it because certain events do different things. But then how do I parse all the scenarios that a newspaper can deliver? A big switch statement seems very long and complicated to do. I am wondering if there is a simpler way to handle this kind of thing. Related to this is that there might be no news that day and I'm not sure what the newspaper should display, should it just display the last headline? So, in summary. 1) A newspaper generates a headline, it affects different things, such as the world economy, prices, how city reacts 2) I need the newspaper to generate headlines (although there may be days when there are no headlines at all), but I am not sure how to parse it without using a big-ass switch statement. Thanks in advance.

    Read the article

  • Can I use remade sprites in my game?

    - by John Skridles
    Can I use remade sprites in my game? I am making a game and I used some sprites, but I didn't copy them. I remade them completely the character looks nothing like the original. I only did this to get the movement of the character right (moving, running, jumping, punching). I've been working on the game for a long time, so I really need to know is it safe and legal to do this. I do intend making a small profit.

    Read the article

  • How can I handle copyrighted music?

    - by David Dimalanta
    I have a curious question regarding on musics used in music rhythm game. In Guitar Hero for example, they used all different music albums in one program. Then, each album requires to ask permission to the owner, composer of the music, or the copyright owner of the music. Let's say, if you used 15 albums for the music rhythm game, then you have to contact 15 copyright owners and it might be that, for the game developer, that the profit earned goes to the copyright owner or owner of this music. For the independent game developers, was it okay if either used the copyright music by just mentioning the name of the singer included in the credits and in the music select screen or use the non-popular/old music that about 50 years ago? And, does still earn money for the indie game developers by making free downloadable game?

    Read the article

  • Smooth animation on a persistently refreshing canvas

    - by Neurofluxation
    Yo everyone! I have been working on an Isometric Tile Game Engine in HTML5/Canvas for a little while now and I have a complete working game. Earlier today I looked back over my code and thought: "hmm, let's try to get this animated smoothly..." And since then, that is all I have tried to do. The problem I would like the character to actually "slide" from tile to tile - but the canvas redrawing doesn't allow this - does anyone have any ideas....? Code and fiddle below... Fiddle with it! http://jsfiddle.net/neuroflux/n7VAu/ <html> <head> <title>tileEngine - Isometric</title> <style type="text/css"> * { margin: 0px; padding: 0px; font-family: arial, helvetica, sans-serif; font-size: 12px; cursor: default; } </style> <script type="text/javascript"> var map = Array( //land [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]] ); var tileDict = Array("http://www.wikiword.co.uk/release-candidate/canvas/tileEngine/land.png"); var charDict = Array("http://www.wikiword.co.uk/release-candidate/canvas/tileEngine/mario.png"); var objectDict = Array("http://www.wikiword.co.uk/release-candidate/canvas/tileEngine/rock.png"); //last is one more var objectImg = new Array(); var charImg = new Array(); var tileImg = new Array(); var loaded = 0; var loadTimer; var ymouse; var xmouse; var eventUpdate = 0; var playerX = 0; var playerY = 0; function loadImg(){ //preload images and calculate the total loading time for(var i=0;i<tileDict.length;i++){ tileImg[i] = new Image(); tileImg[i].src = tileDict[i]; tileImg[i].onload = function(){ loaded++; } } i = 0; for(var i=0;i<charDict.length;i++){ charImg[i] = new Image(); charImg[i].src = charDict[i]; charImg[i].onload = function(){ loaded++; } } i = 0; for(var i=0;i<objectDict.length;i++){ objectImg[i] = new Image(); objectImg[i].src = objectDict[i]; objectImg[i].onload = function(){ loaded++; } } } function checkKeycode(event) { //key pressed var keycode; if(event == null) { keyCode = window.event.keyCode; } else { keyCode = event.keyCode; } switch(keyCode) { case 38: //left if(!map[playerX-1][playerY][1] > 0){ playerX--; } break; case 40: //right if(!map[playerX+1][playerY][1] > 0){ playerX++; } break; case 39: //up if(!map[playerX][playerY-1][1] > 0){ playerY--; } break; case 37: //down if(!map[playerX][playerY+1][1] > 0){ playerY++; } break; default: break; } } function loadAll(){ //load the game if(loaded == tileDict.length + charDict.length + objectDict.length){ clearInterval(loadTimer); loadTimer = setInterval(gameUpdate,100); } } function drawMap(){ //draw the map (in intervals) var tileH = 25; var tileW = 50; mapX = 80; mapY = 10; for(i=0;i<map.length;i++){ for(j=0;j<map[i].length;j++){ var drawTile= map[i][j][0]; var xpos = (i-j)*tileH + mapX*4.5; var ypos = (i+j)*tileH/2+ mapY*3.0; ctx.drawImage(tileImg[drawTile],xpos,ypos); if(i == playerX && j == playerY){ you = ctx.drawImage(charImg[0],xpos,ypos-(charImg[0].height/2)); } } } } function init(){ //initialise the main functions and even handlers ctx = document.getElementById('main').getContext('2d'); loadImg(); loadTimer = setInterval(loadAll,10); document.onkeydown = checkKeycode; } function gameUpdate() { //update the game, clear canvas etc ctx.clearRect(0,0,904,460); ctx.fillStyle = "rgba(255, 255, 255, 1.0)"; //assign color drawMap(); } </script> </head> <body align="center" style="text-align: center;" onload="init()"> <canvas id="main" width="904" height="465"> <h1 style="color: white; font-size: 24px;">I'll be damned, there be no HTML5 &amp; canvas support on this 'ere electronic machine!<sub>This game, jus' plain ol' won't work!</sub></h1> </canvas> </body> </html>

    Read the article

  • Why does File.Exists return false?

    - by Jonas Stawski
    I'm querying all images on the Android device as such: string[] columns = { MediaStore.Images.Media.InterfaceConsts.Data, MediaStore.Images.Media.InterfaceConsts.Id }; string orderBy = MediaStore.Images.Media.InterfaceConsts.Id; var imagecursor = ManagedQuery(MediaStore.Images.Media.ExternalContentUri, columns, null, null, orderBy); for (int i = 0; i < this.Count; i++) { imagecursor.MoveToPosition(i); Paths[i]= imagecursor.GetString(dataColumnIndex); Console.WriteLine(Paths[i]); Console.WriteLine(System.IO.File.Exists(Paths[i])); } The problem is that the output shows that some files don't exist. Here's a sample output: /storage/sdcard0/Download/On-Yom-Kippur-Jews-choose-different-shoes-VSETQJ6-x-large.jpg False /storage/sdcard0/Download/397277_10151250943161341_876027377_n.jpg False /storage/sdcard0/Download/Roxy_Cottontail_&_Melo-X_Present..._Some_Bunny_Love's_You.jpg False /storage/sdcard0/Download/album-The-Rolling-Stones-Some-Girls.jpg True /storage/sdcard0/Download/some-people-ust-dont-appreciate-fashion[1].jpg True /storage/sdcard0/Download/express.gif True ... /storage/sdcard0/Download/some-joys-are-expressed-better-in-silence.JPG False How is this possible? I downloaded these images myself from the internet! They should exist in disk.

    Read the article

  • Why does XCode keep downloading old deleted profiles and duplicates of the same profile?

    - by Piepants
    If I refresh the profiles in XCode it: a) Pulls down ones that no longer exist. Profiles that have been deleted from the portal and are no longer there b) Pulls down multiple copies of the same profile. If I add a new device and then update the profiles to include that new device. Then XCode will pull down the new updated profile but also the same profile with an older date (even though the portal only shows one, the latest). If I delete them them XCode they re-appear. I'm having problems getting push notifications to work with an ad-hoc distrubtion and so want to ensure I am build with the latest profiles. This behaviour of XCode is irritating at least, and possibly the source of my problems at worst.

    Read the article

  • Smarty dynamic error list

    - by Brainscrewer
    Im new to Smarty in combination with PHP and I really like it. Unfortunatly im running into a problem while validating fields after a $_POST has been done. I've made an array called $errors and use that to save error messages in, for example: $errors[] .= "Wrong email";. My problem is in sending the $errors array over to the template so I can use it to display the error messages. My question: How do you 'transfer' the $errors variable over to the template file so you can use it there with, for example {foreach}. I was planning on doing something like {if $hasErrors} {foreach from=errors item=error} <li>{$error}</li> {/foreach} {/if} Thanks in advance

    Read the article

  • How to get path to wallpaper

    - by kentcdodds
    My Question: How do you get the filepath to the current wallpaper? Expansion: I'm writing an app that will let you change the wallpaper easily between different presets. I want to store the filepath of the available wallpapers in my database. What I've tried: WallpaperManger.getWallpaperInfo() or WallpaperManger.getDrawable(). Neither seem to contain the actual location of the file. Any help would be appreciated! :D Thanks! Also, I'm including live-wallpapers. Thanks!

    Read the article

  • PHP => Alternative to session data?

    - by Armz
    i have a Web Application where Cookies and Session are both important. Since the Web Application is load balanced on different server, i am looking for suggestions to Alternative Store for the Session data that all server will be able to access. Some sessions could live up to severals days. The solutions that come to my mind: - Native PHP Sessions (this is the one i want to stop using) - MySQL Database - Serialize and write to a file (i want to avoid this, for performances) - Memcache (however it could become very big or older data getting knocked out) Thanks in advance!

    Read the article

  • how to redirect user depending on user type at time of login (codeignitor)

    - by Anam Tahir
    im facing problem while redirecting my user according to its type. how can do it here's my code plz suggest how to do it. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class VerifyLogin extends CI_Controller { function __construct() { parent::__construct(); } function index() { $this->load->model('user','',TRUE); //This method will have the credentials validation $this->load->library('form_validation'); $this->load->library('session'); $this->form_validation->set_rules('username', 'Username','trim|required|xss_clean'); $this->form_validation->set_rules('password', 'Password' 'trim|required|xss_clean|callback_check_database'); if($this->form_validation->run() == FALSE) { //Field validation failed.&nbsp; User redirected to login page validation_errors(); $this->load->view('error'); } else { //Go to private area basically here i want to redirect if user is admin then redirect to admin page else redirect to home how can i do this ??? redirect('home', 'refresh'); } } function check_database($password) { //Field validation succeeded.&nbsp; Validate against database $username = $this->input->post('username'); //query the database $result = $this->user->login($username, $password); if($result) { $sess_array = array(); foreach($result as $row) { $sess_array = array( 'id' => $row->id, 'username' => $row->username ); $this->session->set_userdata('logged_in', $sess_array); } return TRUE; } else { $this->form_validation->set_message('check_database', 'Invalid username or password'); return false; } } } ?>

    Read the article

  • How to end a thread in perl

    - by user1672190
    I am new to perl and i have a question about perl thread. I am trying to create a new thread to check if the running function is timed out, and my way of doing it is as below. Logic is 1.create a new thread 2.run the main function and see if it is timed out, if ture, kill it Sample code: $exit_tread = false; # a flag to make sure timeout thread will run my $thr_timeout = threads->new( \&timeout ); execute main function here; $exit_thread = true # set the flag to true to force thread ends $thr_timeout->join(); #wait for the timeout thread ends Code of timeout function sub timeout { $timeout = false; my $start_time = time(); while (!$exit_thread) { sleep(1); last if (main function is executed); if (time() - $start_time >= configured time ) { logmsg "process is killed as request timed out"; _kill_remote_process(); $timeout = true; last; } } } now the code is running as i expected, but i am just not very clear if the code $exit_thread = true works because there is a "last" at the end of while loop. Can anybody give me a answer? Thanks

    Read the article

  • Emberjs bindAttr inside of #each

    - by Andrej Kaurin
    Code for view is Ember.View.extend({ template: Ember.Handlebars.compile(html), // html is in string content: function() { return [ { Title: "Dashboard", ID: "dashboard" }, { Title: "Invoices", ID: "invoices" }, { Title: "Expenses", ID: "expenses" }, { Title: "People", ID: "people" }, { Title: "Reports", ID: "reports" }, { Title: "Settings", ID: "settings" } ]}, iconClass: "icon icon-dashboard" }); Template (show above as "html") looks like this: <ul> {{#each link in content}} <li> <a> <span class="icon" {{bindAttr class="iconClass"}}></span> <span class="title">{{link.Title}}</span> </a> </li> {{/each}} </ul> Am I doing something wrong with scope or?

    Read the article

  • dialog.show() crashes my application, why?

    - by user1739462
    I'm new in adroid. I like to do things when the color reach a value. I like (for example) show the alert if r is bigger than 30, but the application go in crash. Thank for very simple answares. public class MainActivity extends Activity { private AlertDialog dialog; private AlertDialog.Builder builder; private BackgroundColors view; public class BackgroundColors extends SurfaceView implements Runnable { public int grand=0; public int step=0; private boolean flip=true; private Thread thread; private boolean running; private SurfaceHolder holder; public BackgroundColors(Context context) { super(context); } Inside this loop while running is true. is impossible to show dialogs ?? public void run() { int r = 0; while (running){ if (holder.getSurface().isValid()){ Canvas canvas = holder.lockCanvas(); if (r > 250) r = 0; r += 10; if (r>30 && flip){ flip=false; // ********************************* dialog.show(); // ********************************* // CRASH !! } try { Thread.sleep(300); } catch(InterruptedException e) { e.printStackTrace(); } canvas.drawARGB(255, r, 255, 255); holder.unlockCanvasAndPost(canvas); } } } public void start() { running = true; thread = new Thread(this); holder = this.getHolder(); thread.start(); } public void stop() { running = false; boolean retry = true; while (retry){ try { thread.join(); retry = false; } catch(InterruptedException e) { retry = true; } } } public boolean onTouchEvent(MotionEvent e){ dialog.show(); return false; } protected void onSizeChanged(int xNew, int yNew, int xOld, int yOld){ super.onSizeChanged(xNew, yNew, xOld, yOld); grand = xNew; step =grand/15; } } public void onCreate(Bundle b) { super.onCreate(b); view = new BackgroundColors(this); this.setContentView(view); builder = new AlertDialog.Builder(this); builder.setMessage("ciao"); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { Log.d("Basic", "It worked"); } }); dialog = builder.create(); } public void onPause(){ super.onPause(); view.stop(); } public void onResume(){ super.onResume(); view.start(); } }

    Read the article

  • Adding nodes to a global linked-list

    - by Zack
    I am attempting to construct my first linked list, and having read a basic introduction, have done the following. Firstly, declare a linked list node as: struct errorNode { uint8 error; struct errorNode* next; }; Secondly, define the first node globally as: struct errorNode errorList = {0, NULL}; This has been done to allow each of the libraries that make up my current project to insert errors into a common list. The function to do this is: void errorListWrite(uint8 error) { struct errorNode* newNode = malloc(sizeof(struct errorNode)); newNode->error = error; newNode->next = &errorList; errorList = *newNode; } Whilst this compiles without error, it does not function as expected. I thnk the problem is with the last two statements of the list write function, but I am unsure. A hint as to what I am doing wrong would be most appreciated.

    Read the article

  • error with redirect using listener JSF 2.0

    - by Ray
    I have a index.xhtml page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <f:view> <ui:insert name="metadata" /> <f:event type="preRenderView" listener="#{item.show}" /> <h:body></h:body> </f:view> </html> And in bean class with scope session this method public void show() throws IOException, DAOException { ExternalContext externalContext = FacesContext.getCurrentInstance() .getExternalContext(); //smth String rootPath = externalContext.getRealPath("/"); String realPath = rootPath + "pages\\template\\body\\list.xhtml"; externalContext.redirect(realPath); } i think that I should redirect to next page but I have "browser can't show page" and list.xhtml (if I do this page as welcome-page I haven't error, it means that error connected with redirect) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:body> <ui:composition template="/pages/layouts/mainLayout.xhtml"> <ui:define name="content"> <h:form></h:form></ui:define></ui:composition> </h:body> </html> in consol i didn't have any error. in web.xml <welcome-file-list> <welcome-file>index.xhtml</welcome-file> </welcome-file-list> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.xhtml</url-pattern> </servlet-mapping> What can be the reason this problem?

    Read the article

  • Server sends json data correctly. Client parses it wrong

    - by alois.wirkes
    I have a PHP code that generates a JSON string to send to my Android app. This part works. The problem is when my app captures that string and try to convert it into a JSONArray object. The main idea is to store that data inside a SQLite database. Here's the code that captures the JSON string: public void getPostResponse(){ try{ br = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8); sb = new StringBuilder(); line = null; while((line = br.readLine()) != null){ sb.append(line+"\n"); } is.close(); result = sb.toString(); Log.e("getPostResponse","result= "+sb.toString()); }catch(Exception e){ Log.e("log_tag","Error converting result "+e.toString()); } } And this is the result in the LogCat: 10-11 16:27:01.171: E/getPostResponse(9155): result= [{ "establecimientos":[]},{ "rutas":[]},{ "formularios":[]},{ "clientes":[]},{ "mediciones":[]}] This is why I think there's an error, the result variable should contain the whole JSON string and it doesn't. Any ideas? Variables br, sb, line and result are declared globally. JSON sent from server is already a JSONArray (starts with '[' and ends with ']'), is this what's causing the problem?

    Read the article

  • How to take a NSString such as, "0+1+2", get the sum of those and create new string. Obj-C

    - by Ace Legend
    Alright. My app has a text field and next to it are two buttons (Plus button and Equals button). When you press the "Plus" button, it takes the text inside of the textField and adds a "+" to it. Code below: - (IBAction)plusButtonPressed:(id)sender { NSString *plusString = @"+"; NSString *inputString = carbsField.text; NSString *outputString = [NSString stringWithFormat:@"%@%@",inputString,plusString]; NSLog(@"%@",outputString); [carbsField setText:outputString]; } I will eventually make that more intelligent so that I can't put two pluses or whatever. Anyway, then I want the equal button to take whatever is in the textField, which should look something like: "23+54+2.2" and get the sum of those values. I believe I know how to take an Integer and make it a String, but I want to verify it: int *value = 56; NSString *string = @"%d",value; Well, if anyone can show me how to do this, I would be very appreciative. Thanks. EDIT At the moment, I have not tried anything. This is because I do not know where to start. I have an idea of what to do, but I do not know how to execute it. I believe I need to get all characters before a "+" convert them into int and then get the sum of some array of those values.

    Read the article

  • Subquery max sequence number

    - by Andy Levesque
    I'm hesitant to ask because I'm sure it's out there, but I just can't seem to come up with the keywords to find the answer. I'm stepping outside my boundaries by starting with subqueries (normally an Access user). I have a query that has TECH_ID, SEQ_NBR, and PELL_FT_AWD_AMT SELECT ISRS_V_NEED_ANAL_RESULT_PARENT.TECH_ID, ISRS_V_NEED_ANAL_RESULT_PARENT.AWD_YR, ISRS_V_NEED_ANAL_RESULT_PARENT.PELL_FT_AWD_AMT, ISRS_V_NEED_ANAL_RESULT_PARENT.SEQ_NBR FROM ISRS_V_NEED_ANAL_RESULT_PARENT GROUP BY ISRS_V_NEED_ANAL_RESULT_PARENT.TECH_ID, ISRS_V_NEED_ANAL_RESULT_PARENT.AWD_YR, ISRS_V_NEED_ANAL_RESULT_PARENT.PELL_FT_AWD_AMT, ISRS_V_NEED_ANAL_RESULT_PARENT.SEQ_NBR HAVING (((ISRS_V_NEED_ANAL_RESULT_PARENT.AWD_YR)="2013")) ORDER BY ISRS_V_NEED_ANAL_RESULT_PARENT.TECH_ID; What I want to return is add a subquery that selects only the max SEQ_NUM for each record, but I can't seem to get the syntax right. In the past I would cheat and have a separate query that first gave me the TECH_ID and max SEQ_NUM, and then have a second query that use the original table and the first query in a join to get the rest. How can I do this in one query? Example: TECH_ID SEQ_NUM PELL 1 1 4000 1 2 4000 1 3 5000 Using just the max of the sequence number still returns: 1; 2; 4000 and 1; 3; 5000 when I'm only wanting the latter.

    Read the article

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