Search Results

Search found 2409 results on 97 pages for 'alex polo'.

Page 74/97 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • How to write specific application for facebook?

    - by alex
    Hi there! Please help me with documentation to write specific application for Facebook. Need to know, what language to choose? is specific facebook API? is documentation for API? is site with samples catalogue? need to know all related info. Some words about app, it would be app, which compare users interests. Thanks in advance.

    Read the article

  • Scan site for images and alt tags

    - by Alex
    We'd like to run an scan on our site that returns a report with the following: each image tag found and a visual representation of that image on the report the alt tag for that image (also identify if an alt tag not found) Is there a simple tool that does this? We're attempting to check for alt tags, and make sure the alt tags accurately describe to the image they represent. That's why the visual representation in the report is important.

    Read the article

  • Access to the path Server.MapPath is denied

    - by Alex
    I created one pdf document var document = new Document(); string path = Server.MapPath("AttachementToMail"); PdfWriter.GetInstance(document, new FileStream(path + "/"+DateTime.Now.ToShortDateString()+".pdf", FileMode.Create)); Now I want to download this document Response.ContentType = "Application/pdf"; Response.AppendHeader("Content-Disposition", "attachment; filename="+ DateTime.Now.ToShortDateString() + ".pdf" + ""); Response.TransmitFile(path); Response.End(); but it gave me error Access to the path '~\AttachementToMail' is denied. read / write access for IIS_IUSRS exists

    Read the article

  • jQuery slideUp and slideDwon issues

    - by Alex
    I need the classes 'two and three' to be hidden as soon as the page load and than be able to click again on the menu to slide it down, I am having probles with the following code: $(document).ready(function() { $('.two, .three').slideUp('slow'); $('.active_wrapper').click(function(){ $('.two, .three').slideDown('slow'); }); }); HTML <div class="nav_wrapper"> <div class="active_wrapper one"><a class="active" href="">home</a></div> <div class="two"><a href="about.html">about</a></div> <div class="three"><a href="project.html">project</a></div> </div>

    Read the article

  • How can I identify an element from a list within another list

    - by Alex
    I have been trying to make a block of code that finds the index of the largest bid for each item. Then I was going to use the index as a way to identify the person who paid that much moneys name. However no matter what i try I can't link the person and what they have gained from the auction together. Here is the code I have been writing: It has to be able to work with any information inputted def sealedBids(): n = int(input('\nHow many people are in the group? ')) z = 0 g = [] s = [] b = [] f = [] w = []#goes by number of items q = [] while z < n: b.append([]) z = z + 1 z = 0 while z < n: g.append(input('Enter a bidders name: ')) z = z + 1 z = 0 i = int(input('How many items are being bid on?')) while z < i: s.append(input('Enter the name of an item: ')) w.append(z) z = z + 1 z = 0 for j in range(n):#specifies which persons bids your taking for k in range(i):#specifies which item is being bid on b[j].append(int(input('How much money has {0} bid on the {1}? '.format(g[j], s[k])))) print(' ') for j in range(n):#calculates fair share f.append(sum(b[j])/n) for j in range(i):#identifies which quantity of money was the largest for each item for k in range(n): if w[j] < b[k][j]: w[j] = b[k][j] q.append(k) any advice is much appreciated.

    Read the article

  • Best Practice for Exporting an App's Data to XML via PHP/MySQL?

    - by Alex Cook
    I have an a business app and I want to give my users the ability to export their data at anytime. I'm aware that I can write an XML file semi-manually by doing something like this: http://www.kirupa.com/web/mysql_xml_php.htm But, I thought I'd ask if this is the best practice? Or is there some framework I can use to do this more easily/quickly? Maybe there isn't - it won't be too hard to do it the above way. Also, less importantly - XML is the best format to export to, right? Thanks in advance.

    Read the article

  • When do you use Java's @Override annotation and why?

    - by Alex B
    What are the best practices for using Java's @Override annotation and why? It seems like it would be overkill to mark every single overridden method with the @Override annotation. Are there certain programming situations that call for using the @Override and others that should never use the @Override?

    Read the article

  • Set the amount of rows JList show (Java)

    - by Alex Cheng
    Hi all. Problem: I have a method that creates a list from the parsed ArrayList. I manage to show the list in the GUI, without scrollbar. However, I am having problem setting it to show only the size of ArrayList. Meaning, say if the size is 6, there should only be 6 rows in the shown List. Below is the code that I am using. I tried setting the visibleRowCount as below but it does not work. I tried printing out the result and it shows that the change is made. private void createSuggestionList(ArrayList<String> str) { int visibleRowCount = str.size(); System.out.println("visibleRowCount " + visibleRowCount); listForSuggestion = new JList(str.toArray()); listForSuggestion.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); listForSuggestion.setSelectedIndex(0); listForSuggestion.setVisibleRowCount(visibleRowCount); System.out.println(listForSuggestion.getVisibleRowCount()); listScrollPane = new JScrollPane(listForSuggestion); MouseListener mouseListener = new MouseAdapter() { @Override public void mouseClicked(MouseEvent mouseEvent) { JList theList = (JList) mouseEvent.getSource(); if (mouseEvent.getClickCount() == 2) { int index = theList.locationToIndex(mouseEvent.getPoint()); if (index >= 0) { Object o = theList.getModel().getElementAt(index); System.out.println("Double-clicked on: " + o.toString()); } } } }; listForSuggestion.addMouseListener(mouseListener); textPane.add(listScrollPane); repaint(); } To summarize: I want the JList to show as many rows as the size of the parsed ArrayList, without a scrollbar. Any ideas? Please help. Thanks. Please let me know if a picture of the problem is needed in case I did not phrase my question correctly.

    Read the article

  • How to peform an external request in Kohana 3?

    - by alex
    I've always used cURL for this sort of stuff, but this article got me thinking I could request another page easily using the Request object in Kohana 3. $url = 'http://www.example.com'; $update = Request::factory($url); $update->method = 'POST'; $update->post = array( 'key' => 'value' ); $update->execute(); echo $update->response; However I get the error Accessing static property Request::$method as non static From this I can assume it means that the method method is static, but that doesn't help me much. I also copied and pasted the example from that article and it threw the same error. Basically, I'm trying to POST to a new page on an external server, and do it the Kohana way. So, am I doing this correctly, or should I just use cURL (or file_get_contents() with context)?

    Read the article

  • Using LEFT JOIN to only selection one joined row

    - by Alex
    I'm trying to LEFT JOIN two tables, to get a list of all rows from TABLE_1 and ONE related row from TABLE_2. I have tried LEFT JOIN and GROUP BY c_id, however I wan't the related row from TABLE_2 to be sorted by isHeadOffice DESC. Here are some sample tables TABLE 1 c_id Name ---------------- 1 USA 2 Canada 3 England 4 France 5 Spain TABLE2 o_id c_id Office isHeadOffice ------------------------------------------------ 1 1 New York 1 2 1 Washington 0 3 1 Boston 0 4 2 Toronto 0 5 3 London 0 6 3 Manchester 1 7 4 Paris 1 8 4 Lyon 0 So what I am trying to get from this would be something like: RESULTS c_id Name Office ---------------------------- 1 USA New York 2 Canada Toronto 3 England Manchester 4 France Paris 5 Spain NULL I'm using PHP & MySQL. Any ideas?

    Read the article

  • A Null Reference Exception

    - by Alex
    "Object reference not set to an instance of an object." using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; namespace XNAdev { class Sprite { //The size of the Sprite public Rectangle Size; //Used to size the Sprite up or down from the original image public float Scale = 1.0f; //The current position of the Sprite public Vector2 Position = new Vector2(115, 0); //The texture object used when drawing the sprite private Texture2D mSpriteTexture; //Load the texture for the sprite using the Content Pipeline public void LoadContent(ContentManager theContentManager, string theAssetName) { mSpriteTexture = theContentManager.Load<Texture2D>(theAssetName); Size = new Rectangle(0, 0, (int)(mSpriteTexture.Width * Scale), (int)(mSpriteTexture.Height * Scale)); } //Draw the sprite to the screen public void Draw(SpriteBatch theSpriteBatch) { theSpriteBatch.Draw(mSpriteTexture, Position, new Rectangle(0, 0, mSpriteTexture.Width, mSpriteTexture.Height), Color.White, 0.0f, Vector2.Zero, Scale, SpriteEffects.None, 0); } } } I am very new at this C# so any help would be great. I have no idea what my error is.

    Read the article

  • Removing title from wp_list_cats()

    - by Alex
    I'm trying to remove/replace the title attribute on the category elements used by WordPress. I'm using WordPress 2.9.1, with the following code: <div id="categories"> <h3>Manufacturers</h3> <ul> <?php str_replace("title=\"View all posts filed under ","",wp_list_categories('use_desc_for_title=0&exclude=1,2,3,4,5&title_li=&hierarchical=1')); ?> </ul> </div> From what I had read this method used to work on older versions (I had never tried it though). I really don't want to hack at the interals of WordPress, or have to use a JavaScript hack, for something so straight forward. Any help is appreciated... Update below is what is created from the code above... Manufacturers Featured

    Read the article

  • Linux directories

    - by Alex Farber
    I am writing installation script for my program, which is supposed to run on Linux/Unix OS. What is the default directory for the following files: Executable files (programs). Program should be executed by typing its name from the command line. Shared libraries. Third-party shared libraries (the program is not open source, so I need to redistribute third-party libraries). Read-only program configuration files for all users. Configuration data available for read/write access for all users.

    Read the article

  • "reduce" or "apply" using logical functions in Clojure

    - by Alex B
    I cannot use logical functions on a range of booleans in Clojure (1.2). Neither of the following works due to logical functions being macros: (reduce and [... sequence of bools ...]) (apply or [... sequence of bools ...]) The error saying that I "can't take value of a macro: #'clojure.core/and". How to apply these logical functions (macros) without writing boilerplate code?

    Read the article

  • shell_exec syntax error. running in terminal directly is ok

    - by Alex
    Having this command: $command = "diff -bBdH --ignore-all-space <(echo 'hi') <(echo 'hi1')"; echo $command; $result = shell_exec($command); On the screen I see: sh: 1: Syntax error: "(" unexpected diff -bBdH --ignore-all-space <(echo 'hi') <(echo 'hi1') If I copy-paste the second line from the console output into the terminal, the result would be correct. (Reproduced on another machine too). I'm missing something dead simple here and can't see what it is. besides, why is my output reversed? I'm clearly echoing the command before executing it, thus the syntax error of the shell should appear after the shell_exec

    Read the article

  • Normalizing a table

    - by Alex
    I have a legacy table, which I can't change. The values in it can be modified from legacy application (application also can't be changed). Due to a lot of access to the table from new application (new requirement), I'd like to create a temporary table, which would hopefully speed up the queries. The actual requirement, is to calculate number of business days from X to Y. For example, give me all business days from Jan 1'st 2001 until Dec 24'th 2004. The table is used to mark which days are off, as different companies may have different days off - it isn't just Saturday + Sunday) The temporary table would be created from a .NET program, each time user enters the screen for this query (user may run query multiple times, with different values, table is created once), so I'd like it to be as fast as possible. Approach below runs in under a second, but I only tested it with a small dataset, and still it takes probably close to half a second, which isn't great for UI - even though it's just the overhead for first query. The legacy table looks like this: CREATE TABLE [business_days]( [country_code] [char](3) , [state_code] [varchar](4) , [calendar_year] [int] , [calendar_month] [varchar](31) , [calendar_month2] [varchar](31) , [calendar_month3] [varchar](31) , [calendar_month4] [varchar](31) , [calendar_month5] [varchar](31) , [calendar_month6] [varchar](31) , [calendar_month7] [varchar](31) , [calendar_month8] [varchar](31) , [calendar_month9] [varchar](31) , [calendar_month10] [varchar](31) , [calendar_month11] [varchar](31) , [calendar_month12] [varchar](31) , misc. ) Each month has 31 characters, and any day off (Saturday + Sunday + holiday) is marked with X. Each half day is marked with an 'H'. For example, if a month starts on a Thursday, than it will look like (Thursday+Friday workdays, Saturday+Sunday marked with X): ' XX XX ..' I'd like the new table to look like so: create table #Temp (country varchar(3), state varchar(4), date datetime, hours int) And I'd like to only have rows for days which are off (marked with X or H from previous query) What I ended up doing, so far is this: Create a temporary-intermediate table, that looks like this: create table #Temp_2 (country_code varchar(3), state_code varchar(4), calendar_year int, calendar_month varchar(31), month_code int) To populate it, I have a union which basically unions calendar_month, calendar_month2, calendar_month3, etc. Than I have a loop which loops through all the rows in #Temp_2, after each row is processed, it is removed from #Temp_2. To process the row there is a loop from 1 to 31, and substring(calendar_month, counter, 1) is checked for either X or H, in which case there is an insert into #Temp table. [edit added code] Declare @country_code char(3) Declare @state_code varchar(4) Declare @calendar_year int Declare @calendar_month varchar(31) Declare @month_code int Declare @calendar_date datetime Declare @day_code int WHILE EXISTS(SELECT * From #Temp_2) -- where processed = 0) BEGIN Select Top 1 @country_code = t2.country_code, @state_code = t2.state_code, @calendar_year = t2.calendar_year, @calendar_month = t2.calendar_month, @month_code = t2.month_code From #Temp_2 t2 -- where processed = 0 set @day_code = 1 while @day_code <= 31 begin if substring(@calendar_month, @day_code, 1) = 'X' begin set @calendar_date = convert(datetime, (cast(@month_code as varchar) + '/' + cast(@day_code as varchar) + '/' + cast(@calendar_year as varchar))) insert into #Temp (country, state, date, hours) values (@country_code, @state_code, @calendar_date, 8) end if substring(@calendar_month, @day_code, 1) = 'H' begin set @calendar_date = convert(datetime, (cast(@month_code as varchar) + '/' + cast(@day_code as varchar) + '/' + cast(@calendar_year as varchar))) insert into #Temp (country, state, date, hours) values (@country_code, @state_code, @calendar_date, 4) end set @day_code = @day_code + 1 end delete from #Temp_2 where @country_code = country_code AND @state_code = state_code AND @calendar_year = calendar_year AND @calendar_month = calendar_month AND @month_code = month_code --update #Temp_2 set processed = 1 where @country_code = country_code AND @state_code = state_code AND @calendar_year = calendar_year AND @calendar_month = calendar_month AND @month_code = month_code END I am not an expert in SQL, so I'd like to get some input on my approach, and maybe even a much better approach suggestion. After having the temp table, I'm planning to do (dates would be coming from a table): select cast(convert(datetime, ('01/31/2012'), 101) -convert(datetime, ('01/17/2012'), 101) as int) - ((select sum(hours) from #Temp where date between convert(datetime, ('01/17/2012'), 101) and convert(datetime, ('01/31/2012'), 101)) / 8) Besides the solution of normalizing the table, the other solution I implemented for now, is a function which does all this logic of getting the business days by scanning the current table. It runs pretty fast, but I'm hesitant to call a function, if I can instead add a simpler query to get result. (I'm currently trying this on MSSQL, but I would need to do same for Sybase ASE and Oracle)

    Read the article

  • Need help with cURL and POSTing in PHP

    - by alex
    I need to post to a payment gateway. The example PHP script for the gateway simply sets the XML like this curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlRequest); // $xmlRequest is just a string of XML In all of my experience, generally you need to use an array with key/values or a string similar to GET params. I am using Kohana, and tracked down a cURL module. It accepts the POST key/values as an array only. Now, I could ditch the module and throw some cURL straight in, but I am using this module fine all throughout the site, so would prefer to use it here. So, my question is, how does that first one work? Does it just POST the whole thing without any named key? Is there a default key I could use for an array to get the module to work?

    Read the article

  • Why is this Scala example of implicit paremeter not working?

    - by Alex R
    simple REPL test... def g(a:Int)(implicit b:Int) = {a+b} Why do neither of these attempted usages work? 1. scala class A { var b:Int =8; var c = g(2) } :6: error: could not find implicit value for parameter b: Int class A { var b:Int =8; var c = g(2) } 2. scala class A(var b:Int) { var c = g(2) } :6: error: could not find implicit value for parameter b: Int class A(var b:Int) { var c = g(2) } ^ Thanks

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >