Search Results

Search found 7 results on 1 pages for 'andra'.

Page 1/1 | 1 

  • How to manage a growing team?

    - by Andra
    I'm the admin assistant of the CTO and our organization has recently experienced a lot of growth. Within six months, we have merged with another organization and our Dev team has grown from 8 to 16, with another 8 people in QA. What we're dealing with now is a highly technical individual, with little patience, managing a much larger team than he's accustomed to, 40% of which is junior as well as an increase in the number of projects. Needless to say, my boss is being pulled in too many directions at once. How can I help him manage his workload and his team so that the team feels they're getting enough help and support and remain effective? Also, where can I find additional resources on managing a growing team?

    Read the article

  • Finding all the shortest paths between two nodes in unweighted directed graphs using BFS algorithm

    - by andra-isan
    Hi All, I am working on a problem that I need to find all the shortest path between two nodes in a given directed unweighted graph. I have used BFS algorithm to do the job, but unfortunately I can only print one shortest path not all of them, for example if they are 4 paths having lenght 3, my algorithm only prints the first one but I would like it to print all the four shortest paths. I was wondering in the following code, how should I change it so that all the shortest paths between two nodes could be printed out? class graphNode{ public: int id; string name; bool status; double weight;}; map<int, map<int,graphNode>* > graph; int Graph::BFS(graphNode &v, graphNode &w){ queue <int> q; map <int, int> map1; // this is to check if the node has been visited or not. std::string str= ""; map<int,int> inQ; // just to check that we do not insert the same iterm twice in the queue map <int, map<int, graphNode>* >::iterator pos; pos = graph.find(v.id); if(pos == graph.end()) { cout << v.id << " does not exists in the graph " <<endl; return 1; } int parents[graph.size()+1]; // this vector keeps track of the parents for the node parents[v.id] = -1; // there is a direct path between these two words, simply print that path as the shortest path if (findDirectEdge(v.id,w.id) == 1 ){ cout << " Shortest Path: " << v.id << " -> " << w.id << endl; return 1; } //if else{ int gn; map <int, map<int, graphNode>* >::iterator pos; q.push(v.id); inQ.insert(make_pair(v.id, v.id)); while (!q.empty()){ gn = q.front(); q.pop(); map<int, int>::iterator it; cout << " Popping: " << gn <<endl; map1.insert(make_pair(gn,gn)); //backtracing to print all the nodes if gn is the same as our target node such as w.id if (gn == w.id){ int current = w.id; cout << current << " - > "; while (current!=v.id){ current = parents[current]; cout << current << " -> "; } cout <<endl; } if ((pos = graph.find(gn)) == graph.end()) { cout << " pos is empty " <<endl; continue; } map<int, graphNode>* pn = pos->second; map<int, graphNode>::iterator p = pn->begin(); while(p != pn->end()) { map<int, int>::iterator it; //map1 keeps track of the visited nodes it = map1.find(p->first); graphNode gn1= p->second; if (it== map1.end()) { map<int, int>::iterator it1; //if the node already exits in the inQ, we do not insert it twice it1 = inQ.find(p->first); if (it1== inQ.end()){ parents[p->first] = gn; cout << " inserting " << p->first << " into the queue " <<endl; q.push(p->first); // add it to the queue } //if } //if p++; } //while } //while } I do appreciate all your great help Thanks, Andra

    Read the article

  • How to redirect a name-based VirtualHost to a different port?

    - by Andra
    I have a virtuoso sparql endpoint installed, which I want to make available through a hostname (e.g. www.virtuosoexample.com). The thing with virtuoso is that the is no Document root. The endpoint is initiated by the daemon and made available through a source port (e.g. localhost:1234/) I know how to set a virtual host pointing to a document root, but i don't know how to do this for a server with a port number. Any advice would be appreciated. Below is the code, how I would do it with a document root. I tried to change that (naively) into localhost:1234/sparql, but that didn't work <VirtualHost * ServerName www.virtuosoexample.com <www.virtuosoexample.com> ServerAlias www.virtuosoexample.com <www.virtuosoexample.com> ErrorLog /var/log/apache2/error.wp-sparql.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.wp-sparql.log combined DocumentRoot /var/www/endpoint/sparql/ <Directory /var/www/endpoint/sparql> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost

    Read the article

  • JAVA Casting error

    - by user1612725
    Im creating a program that uses Dijksrtras algorithm, im using nodes that represent cities on an imported map, and you can create edges between two cities on the map. My problem is every edge has a "weight" where it will represent distance in minutes and i have a function where i want to see the distance between the two edges. But i keep getting the error "Cannot cast from Stad to Edge" at the line Edge<Stad> selectedEdge = (Edge) fvf.visaFörbLista.getSelectedValue(); where "Stad" represents the city and "Edge" an edge. FormVisaförbindelse fvf = new FormVisaförbindelse(); for(;;){ try{ int svar = showConfirmDialog(null, fvf, "Ändra Förbindelser", JOptionPane.OK_CANCEL_OPTION); if (svar != YES_OPTION) return; if (fvf.visaFörbLista.isSelectionEmpty() == true){ showMessageDialog(mainMethod.this, "En Förbindelse måste valjas.","Fel!", ERROR_MESSAGE); return; } Edge<Stad> selectedEdge = (Edge) fvf.visaFörbLista.getSelectedValue(); FormÄndraförbindelse faf = new FormÄndraförbindelse(); faf.setförbNamn(selectedEdge.getNamn()); for(;;){ try{ int svar2 = showConfirmDialog(mainMethod.this, faf, "Ändra Förbindelse", OK_CANCEL_OPTION); if (svar2 != YES_OPTION) return; selectedEdge.setVikt(faf.getförbTid()); List<Edge<Stad>> edges = lg.getEdgesBetween(sB, sA); for (Edge<Stad> edge : edges){ if (edge.getNamn()==selectedEdge.getNamn()){ edge.setVikt(faf.getförbTid()); } } return; } catch(NumberFormatException e){ showMessageDialog(mainMethod.this, "Ogiltig inmatning.","Fel!", ERROR_MESSAGE); }

    Read the article

  • C# Problem with getPixel & setting RTF text colour accordingly

    - by m3n
    Heyo, I'm messing with converting images to ASCII ones. For this I load the image, use getPixel() on each pixel, then change insert a character with that colour into a richTextBox. Bitmap bmBild = new Bitmap(openFileDialog1.FileName.ToString()); // valid image int x = 0, y = 0; for (int i = 0; i <= (bmBild.Width * bmBild.Height - bmBild.Height); i++) { // Ändra text här richTextBox1.Text += "x"; richTextBox1.Select(i, 1); if (bmBild.GetPixel(x, y).IsKnownColor) { richTextBox1.SelectionColor = bmBild.GetPixel(x, y); } else { richTextBox1.SelectionColor = Color.Red; } if (x >= (bmBild.Width -1)) { x = 0; y++; richTextBox1.Text += "\n"; } x++; } GetPixel does return the correct colour, but the text only end up black. If I change this richTextBox1.SelectionColor = bmBild.GetPixel(x, y); to this richTextBox1.SelectionColor = Color.Red; It works fine. Why am I not getting the right colours? (I know it doesn't do the new lines properly, but I thought I'd get to the bottom of this issue first.) Thanks

    Read the article

  • How do you store accented characters coming from a web service into a database?

    - by Thierry Lam
    I have the following word that I fetch via a web service: André From Python, the value looks like: "Andr\u00c3\u00a9". The input is then decoded using json.loads: >>> import json >>> json.loads('{"name":"Andr\\u00c3\\u00a9"}') >>> {u'name': u'Andr\xc3\xa9'} When I store the above in a utf8 MySQL database, the data is stored like the following using Django: SomeObject.objects.create(name=u'Andr\xc3\xa9') Querying the name column from a mysql shell or displaying it in a web page gives: André The web page displays in utf8: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> My database is configured in utf8: mysql> SHOW VARIABLES LIKE 'collation%'; +----------------------+-----------------+ | Variable_name | Value | +----------------------+-----------------+ | collation_connection | utf8_general_ci | | collation_database | utf8_unicode_ci | | collation_server | utf8_unicode_ci | +----------------------+-----------------+ 3 rows in set (0.00 sec) mysql> SHOW VARIABLES LIKE 'character_set%'; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ 8 rows in set (0.00 sec) How can I retrieve the word André from a web service, store it properly in a database with no data loss and display it on a web page in its original form?

    Read the article

1