Search Results

Search found 545 results on 22 pages for 'bobby phoenix'.

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

  • CSS style info library

    - by Bobby Jack
    Is anyone aware of a good javascript library to obtain original (i.e. not computed) style for a given element in the DOM? In other words, something one could use to produce the results in Firebug's style tab. Like Firebug, it should take into account inheritance, shortcut properties, and all the other nuances of CSS.

    Read the article

  • Liferay portal theme issue

    - by Bobby
    Hi there, occasionally when hitting the landing page after signing in, the users personal space is displayed instead of the default guest page. This is does not happen often, but my boss does not want it happening. I am hard pressed for an explanation.

    Read the article

  • link to a different libc file

    - by bobby
    I want to supply the shared libs along with my program rather than using the system's: ldd says my program uses these shared libs: linux-gate.so.1 = (0xf7ef0000)(made by kernel) libc.so.6 = /lib32/libc.so.6 (0xf7d88000)(libc-2.7.so) /lib/ld-linux.so.2 (0xf7ef1000)(ld-2.7.so) I have successfully linked ld-xxx.so by compiling like this: gcc -std=c99 -D_POSIX_C_SOURCE=200112L -O2 -m32 -s -Wl,-dynamic-linker,ld-2.7.so myprogram.c But I have not managed to successfuly link libc-xxx.so. How can I do that ?

    Read the article

  • javamail api isertion of main class help

    - by bobby
    import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import javax.mail.*; import javax.mail.internet.*; import javax.mail.event.*; import javax.mail.Authenticator; import java.net.*; import java.util.*; public class servletmail extends HttpServlet { public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException { PrintWriter out=response.getWriter(); response.setContentType("text/html"); try { Properties props=new Properties(); props.put("mail.transport.protocol", "smtp"); props.put("mail.smtp.host","smtp.googlemail.com"); props.put("mail.smtp.port", "995"); props.put("mail.smtp.auth", "true"); javax.mail.Authenticator authenticator = new javax.mail.Authenticator() { protected javax.mail.PasswordAuthentication getPasswordAuthentication() { return new javax.mail.PasswordAuthentication("[email protected]", "password"); } }; Session sess=Session.getDefaultInstance(props,authenticator); sess.setDebug (true); Transport transport =sess.getTransport ("smtp"); Message msg=new MimeMessage(sess); msg.setFrom(new InternetAddress("[email protected]")); msg.addRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]")); msg.setSubject("Hello JavaMail"); msg.setText("Welcome to JavaMail"); transport.connect(); transport.send(msg); out.println("mail has been sent"); } catch(Exception e) { System.out.println("err"+e); } } } how to insert main class in above java code and how to pass arguments of "from" and "to"

    Read the article

  • how to add tab bars?

    - by shishir.bobby
    Hi all, i m having an view based application, in my second view i want to have an 5 tabs. but i hv no idea how to implement it. i hv already added 5 tabs,but its not working, any tutorials or somethionng will be very helpfdul thanks a ton

    Read the article

  • Writing a managed wrapper for unmanaged (C++) code - custom types/structs

    - by Bobby
    faacEncConfigurationPtr FAACAPI faacEncGetCurrentConfiguration( faacEncHandle hEncoder); I'm trying to come up with a simple wrapper for this C++ library; I've never done more than very simple p/invoke interop before - like one function call with primitive arguments. So, given the above C++ function, for example, what should I do to deal with the return type, and parameter? FAACAPI is defined as: #define FAACAPI __stdcall faacEncConfigurationPtr is defined: typedef struct faacEncConfiguration { int version; char *name; char *copyright; unsigned int mpegVersion; unsigned long bitRate; unsigned int inputFormat; int shortctl; psymodellist_t *psymodellist; int channel_map[64]; } faacEncConfiguration, *faacEncConfigurationPtr; AFAIK this means that the return type of the function is a reference to this struct? And faacEncHandle is: typedef struct { unsigned int numChannels; unsigned long sampleRate; ... SR_INFO *srInfo; double *sampleBuff[MAX_CHANNELS]; ... double *freqBuff[MAX_CHANNELS]; double *overlapBuff[MAX_CHANNELS]; double *msSpectrum[MAX_CHANNELS]; CoderInfo coderInfo[MAX_CHANNELS]; ChannelInfo channelInfo[MAX_CHANNELS]; PsyInfo psyInfo[MAX_CHANNELS]; GlobalPsyInfo gpsyInfo; faacEncConfiguration config; psymodel_t *psymodel; /* quantizer specific config */ AACQuantCfg aacquantCfg; /* FFT Tables */ FFT_Tables fft_tables; int bitDiff; } faacEncStruct, *faacEncHandle; So within that struct we see a lot of other types... hmm. Essentially, I'm trying to figure out how to deal with these types in my managed wrapper? Do I need to create versions of these types/structs, in C#? Something like this: [StructLayout(LayoutKind.Sequential)] struct faacEncConfiguration { uint useTns; ulong bitRate; ... } If so then can the runtime automatically "map" these objects onto eachother? And, would I have to create these "mapped" types for all the types in these return types/parameter type hierarchies, all the way down until I get to all primitives? I know this is a broad topic, any advice on getting up-to-speed quickly on what I need to learn to make this happen would be very much appreciated! Thanks!

    Read the article

  • How to NSZombieEnabled for debugging EXC_BAD_ACCESS on release target for an iPhone app?

    - by Bobby Moretti
    I'm developing an iPhone application. I have an EXC_BAD_ACCESS that occurs only in the release target; when I build the debug target the exception does not occur. However, when I set the NSZombieEnabled environment variable to YES, I still get the EXC_BAD_ACCESS with no further information. Is it even possible for NSZombieEnabled to work when executing the release target? I don't see why not, since gdb is running in both cases...

    Read the article

  • When do I need to use, or not use, .datum when appending an svg element

    - by Bobby Gifford
    svg = d3.select("#viz").append("svg").datum(data) //I often see .datum when an area chart is used. Are there any rules of thumb for when .datum is needed? var area = d3.svg.area() .x(function(d) { return x(d.x); }) .y0(height) .y1(function(d) { return y(d.y); }); var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); svg.append("path") .datum(data) .attr("d", area);

    Read the article

  • Setting pointers to structs

    - by Bobby
    I have the following struct: struct Datastore_T { Partition_Datastores_T cmtDatastores; // bytes 0 to 499 Partition_Datastores_T cdhDatastores; // bytes 500 to 999 Partition_Datastores_T gncDatastores; // bytes 1000 to 1499 Partition_Datastores_T inpDatastores; // bytes 1500 1999 Partition_Datastores_T outDatastores; // bytes 2000 to 2499 Partition_Datastores_T tmlDatastores; // bytes 2500 to 2999 Partition_Datastores_T sm_Datastores; // bytes 3000 to 3499 }; I want to set a char* to struct of this type like so: struct Datastore_T datastores; // Elided: datastores is initialized with data here char* DatastoreStartAddr = (char*)&datastores; memset(DatastoreStartAddr, 0, 3500); The problem I have is that DatastoreStartAddr always has a value of zero when it should point to the struct that has been initialized with data. What am I doing wrong?

    Read the article

  • Should I use early returns in C#?

    - by Bobby
    I've learned Visual Basic and was always taught to keep the flow of the program without interruptions, like Goto, Exit and Return. Using nested ifs instead of one return statement seems very natural to me. Now that I'm partly migrating towards C#, I wonder what the best practice is for C-like languages. I've been working on a C# project for some time, and of course discover more code of ExampleB and it's hurting my mind somehow. But what is the best practice for this, what is more often used and are there any reasons against one of the styles? public void ExampleA() { if (a != b) { if (a != c) { bool foundIt; for (int i = 0; i < d.Count && !foundIt; i++) { if (element == f) foundIt = true; } } } } public void ExampleB() { if (a == b) return; if (a == c) return; foreach (object element in d) { if (element == f) break; } }

    Read the article

  • C++ 64bit issue

    - by Bobby
    I have the following code: tmp_data = simulated_data[index_data]; unsigned char *dem_content_buff; dem_content_buff = new unsigned char [dem_content_buff_size]; int tmp_data; unsigned long long tmp_64_data; if (!(strcmp(dems[i].GetValType(), "s32"))) { dem_content_buff[BytFldPos] = tmp_data; dem_content_buff[BytFldPos + 1] = tmp_data >> 8; dem_content_buff[BytFldPos + 2] = tmp_data >> 16; dem_content_buff[BytFldPos + 3] = tmp_data >> 24; } if (!(strcmp(dems[i].GetValType(), "f64"))) { dem_content_buff[BytFldPos] = tmp_data; dem_content_buff[BytFldPos + 1] = tmp_data >> 8; dem_content_buff[BytFldPos + 2] = tmp_data >> 16; dem_content_buff[BytFldPos + 3] = tmp_data >> 24; dem_content_buff[BytFldPos + 4] = tmp_data >> 32; dem_content_buff[BytFldPos + 5] = tmp_data >> 40; dem_content_buff[BytFldPos + 6] = tmp_data >> 48; dem_content_buff[BytFldPos + 7] = tmp_data >> 56; } I am getting some weird memory errors in other places of the application when the second if statement is true and executed. When I comment out the 2nd if statement, the problem works fine. So I suspect the way I am performing bitwise operations for 64bit data is incorrect. Can anyone see anything in this code that needs to be corrected?

    Read the article

  • Reusing a vector in C++

    - by Bobby
    I have a vector declared as a global variable that I need to be able to reuse. For example, I am reading multiple files of data, parsing the data to create objects that are then stored in a vector. vector<Object> objVector(100); void main() { while(THERE_ARE_MORE_FILES_TO_READ) { // Pseudocode ReadFile(); ParseFileIntoVector(); ProcessObjectsInVector(); /* Here I want to 'reset' the vector to 100 empty objects again */ } } Can I reset the vector to be "vector objVector(100)" since it was initially allocated on the stack? If I do "objVector.clear()", it removes all 100 objects and I would have a vector with a size of 0. I need it to be a size of 100 at the start of every loop.

    Read the article

  • json null error help in php

    - by bobby
    I get 'json is null' as error My php file: <?php if (isset($_REQUEST['query'])) { $query = $_REQUEST['query']; $url='https://www.googleapis.com/urlshortener/v1/'; $key='ApiKey'; $result= $url.($query).$key; $ch = curl_init($result); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,1); $resp = curl_exec($ch); curl_close($ch); echo $resp; } ?> My html: <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ // when the user clicks the button $("button").click(function(){ $.getJSON("shortner.php?query="+$('#query').attr("value"),function(json){ $('#results').append('<p>Id : ' + json.id+ '</p>'); $('#results').append('<p>Longurl: ' + json.longurl+ '</p>'); }); }); }); </script> </head> <body> <input type="text" value="Enter a place" id="query" /><button>Get Coordinates</button> <div id="results"></div> Edited : <?php if (isset($_REQUEST['query'])) { $query = $_REQUEST['query']; $url='https://www.googleapis.com/urlshortener/v1/'; $key='Api'; $key2='?key='; $result= $url.$query.$key2.$key; $requestData= json_encode($result); echo var_dump($query); $ch = curl_init($requestData); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,1); $resp = curl_exec($ch); curl_close($ch); echo $resp; } ?>

    Read the article

  • C Program Stalls or Infinite Loops inside and else statement?

    - by Bobby S
    I have this weird thing happening in my C program which has never happened to me before. I am calling a void function with a single parameter, the function is very similar to this so you can get the jist: ... printf("Before Call"); Dumb_Function(a); printf("After Call"); ... ... void Dumb_Function(int a){ if(a == null) { } else{ int i; for(i=0; i<a; i++) { do stuff } printf("test"); } } This will output Before Call test and NOT "After Call" How is this possible? Why does my function not return? Did my program counter get lost? I can not modify it to a non void function. When running the cursor will blink and I am able to type, I press CTRL+C to terminate. Any ideas?

    Read the article

  • Should I delete the string members of a C++ class?

    - by Bobby
    If I have the following declaration: #include <iostream> #include <string> class DEMData { private: int bitFldPos; int bytFldPos; std::string byteOrder; std::string desS; std::string engUnit; std::string oTag; std::string valType; int idx; public: DEMData(); DEMData(const DEMData &d); void SetIndex(int idx); int GetIndex() const; void SetValType(const char* valType); const char* GetValType() const; void SetOTag(const char* oTag); const char* GetOTag() const; void SetEngUnit(const char* engUnit); const char* GetEngUnit() const; void SetDesS(const char* desS); const char* GetDesS() const; void SetByteOrder(const char* byteOrder); const char* GetByteOrder() const; void SetBytFldPos(int bytFldPos); int GetBytFldPos() const; void SetBitFldPos(int bitFldPos); int GetBitFldPos() const; friend std::ostream &operator<<(std::ostream &stream, DEMData d); bool operator==(const DEMData &d) const; ~DEMData(); }; what code should be in the destructor? Should I "delete" the std::string fields?

    Read the article

  • Vertical line on HxW canvas of pixels

    - by bobby williams
    I searched and found nothing. I'm trying to draw lines (simple y=mx+b ones) on a canvas of black pixels. It works fine, but no line occurs when it is vertical. I'm not sure why. My first if statement checks if the denominator is zero, therefore m is undefined and no need for a line equation. My second and third if statement check how steep it is and based on that, calculate the points in between. I don't think there is a need for other classes, since I think there is a bug in my code or I'm just not translating the mathematics into code properly. If more is needed, I'll be happy to post more. /** * Returns an collection of points that connects p1 and p2 */ public ArrayList getPoints() { ArrayList points = new ArrayList(); // checks to see if denominator in m is zero. if zero, undefined. if ((p2.getX() - p1.getX()) == 0) { for (int y = p1.getY(); y<p2.getY(); y++) { points.add(new Point(p1.getX(), y, getColor())); } } double m = (double)(p2.getY()-p1.getY())/(double)(p2.getX()-p1.getX()); int b = (int)(p1.getY() - (m * p1.getX())); // checks to see if slope is steep. if (m > -1 || m < 1) { for (int x = p1.getX(); x<p2.getX(); x++) { int y = (int) ((m*x)+b); points.add(new Point(x, y, getColor())); } } // checks to see if slope is not steep. if (m <= -1 || m >= 1) { for (int y = p1.getY(); y<p2.getY(); y++) { int x = (int) ((y-b)/m); points.add(new Point(x, y, getColor())); } } return points; }

    Read the article

  • Multiple choice test GUI with serialization of Q&A

    - by Bobby
    I'm working on a project for school in Java programming. I need to design a GUI that will take in questions and answers and store them in a file. It should be able to contain an unlimited number of questions. We have covered binary I/O. How do I write the input they give to a file? How would I go about having them add multiple questions from this GUI? package multiplechoice; import java.awt.*; import javax.swing.*; public class MultipleChoice extends JFrame { public MultipleChoice() { /* * Setting Layout */ setLayout(new GridLayout(10,10)); /* * First Question */ add(new JLabel("What is the category of the question?: ")); JTextField category = new JTextField(); add(category); add(new JLabel("Please enter the question you wish to ask: ")); JTextField question = new JTextField(); add(question); add(new JLabel("Please enter the correct answer: ")); JTextField correctAnswer = new JTextField(); add(correctAnswer); add(new JLabel("Please enter a reccomended answer to display: ")); JTextField reccomendedAnswer = new JTextField(); add(reccomendedAnswer); add(new JLabel("Please enter a choice for multiple choice option " + "A")); JTextField A = new JTextField(); add(A); add(new JLabel("Please enter a choice for multiple choice option " + "B")); JTextField B = new JTextField(); add(B); add(new JLabel("Please enter a choice for multiple choice option " + "C")); JTextField C = new JTextField(); add(C); add(new JLabel("Please enter a choice for multiple choice option " + "D")); JTextField D = new JTextField(); add(D); add(new JButton("Compile Questions")); add(new JButton("Next Question")); } public static void main(String[] args) { /* * Creating JFrame to contain questions */ FinalProject frame = new FinalProject(); // FileOutputStream output = new FileOutputStream("Questions.dat"); JPanel panel = new JPanel(); // button.setLayout(); // frame.add(panel); panel.setSize(100,100); // button.setPreferredSize(new Dimension(100,100)); frame.setTitle("FinalProject"); frame.setSize(600, 400); frame.setLocationRelativeTo(null); // Center the frame frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } }

    Read the article

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