|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
On July 13 2016 08:24 Manit0u wrote: May I suggest trying to switch to Nginx for a while? This way you could make sure if it's a problem with Apache or PHP installation.
I will try that tomorrow morning.
|
So I graduated about two months ago, and finding a job is proving to be quite difficult... I feel like my resume is fine and I'm confident in my abilities, but I haven't been able to get a single interview in about a month of searching. I was able to make it on-site with a big 4 company last month, but that has been my one and only interview so far, and since then it has just been a steady stream of rejection emails or no responses at all. Is this a normal experience, or is it possible I'm doing something wrong? Any advice?
|
It could be your resume is not as good as it should be. I don't know about the current US situation but ~2 months searching for a job is fairly ordinary over here (for graduate developers), I know some people who took 7 months or so, and some who had jobs straight out of uni. Are your grades poor, do you have personal or opensource project experience on your resume, do you have a cover letter, are you applying to appropriate positions?
Maybe in the USA what uni you went to will affect things too, not sure.
|
Hyrule18968 Posts
try a tech recruiting firm, it simplifies things
|
I didn't go to a great university unfortunately. It's fairly well respected in the area, but certainly not close to a top school and probably doesn't help me at all. I did have a very good GPA though. I also have a github with some work on it on my resume, but I don't think the code is that great honestly. I'm not sure if it would be better to take it down and have nothing at all though. I've used a cover letter for most applications, but I haven't had anyone look over it. I personally think it's fine though, it basically is just an overview of my skills, a personal anecdote that shows I'm eager to learn/hard worker, and a small bit about why I'm excited to work for the company. I've applied to a handful of jobs that specify entry level, but the majority of open positions are usually just for "Software Engineer," "Java Developer," etc. I'm certainly not applying for any senior positions or anything like that. Maybe I just need to give it more time and keep applying.
On July 13 2016 09:05 tofucake wrote: try a tech recruiting firm, it simplifies things
I've been considering going this route, but I don't really know where to start. I responded back to one recruiting firm that contacted me but they were generally pretty unhelpful. Will have to do some searching.
|
Hyrule18968 Posts
I went through 5 firms (I think) before I found one worth a damn.
|
So, today the management decided that we need to introduce ESB because it's cool. Obviously, I got the job of finding the solution and implementing it (they thought it's ezpz), they also suggested using WSO2 ESB (because Java is the most professional thing ever). I looked over the docs, installed it and played around with it for a while and I was horrified. Apache Camel/ServiceMix looks so much more promising...
But then, when I was regurgitating diagrams and JMS implementation strategies I came upon something that doesn't repel me as much as XML and Java do: https://zato.io/
Have any of you tried it? Or maybe you could recommend some other open-source ESB solutions that don't require writing a metric ton of XML and offer something more than just a bunch of GUI wizards that write said XML for you?
I like researching new technologies but today I totally hated my life...
|
On July 13 2016 08:33 Blitzkrieg0 wrote:Show nested quote +On July 13 2016 08:24 Manit0u wrote: May I suggest trying to switch to Nginx for a while? This way you could make sure if it's a problem with Apache or PHP installation. I will try that tomorrow morning.
Switched to Nginx and its working now. Thanks Manit0u and others who helped out
|
No problem 
And here are some cool articles for everyone (oldie but goodie):
|
hi, im am trying to code a parser in php which gets tables from a german table tennis standings site to get the results and tables on my club homepage.
after some help the parser could send a list of all entries row by row and then i reverse engineered a table out of this list. is there a way to get the table directly?
also: how can i highlight the row that shows my team? i know how to highlight a row via css, but i dont know how i can give an id to the row that shows my team in a dynamic table.
is this even the right place to ask? where can i get help?
|
On July 15 2016 03:56 graNite wrote:hi, im am trying to code a parser in php which gets tables from a german table tennis standings site to get the results and tables on my club homepage. after some help the parser could send a list of all entries row by row and then i reverse engineered a table out of this list. is there a way to get the table directly? also: how can i highlight the row that shows my team? i know how to highlight a row via css, but i dont know how i can give an id to the row that shows my team in a dynamic table. is this even the right place to ask? where can i get help? 
Ok, first of all, do you need the raw html of the page and want to parse that for the table or is there some form of api that would let you get the info you need in a more friendly format (like json)?
Highlighting a row in a dynamic table is no problem at all:
Step 1: Create a class in CSS that does the highlighting you need
tr.hilite { background-color: yellow; }
Step 2: Add class to the row you need
<table> <thead> <tr> <th>#</th> <th>Team name</th> <th>Standings</th> <tr> </thead> <tbody> <?php foreach ($data as $idx => $team) : ?> <?php $hilite = ($team['name'] == 'myTeam') ? ' class="hilite"' : '' ?> <tr<?php echo $hilite ?>> <td><?php echo $idx + 1 ?></td> <td><?php echo $team['name'] ?></td> <td><?php echo $team['standing'] ?></td> <?php endforeach ?> </tbody> </table>
Or, if you prefer to do it some other way...
$data = [ [ 'name' => 'T1', 'standing' => 7, ], [ 'name' => 'T2', 'standing' => 8, ], ];
$rows = [];
foreach ($data as $idx => $team) { $hilite = $team['name'] === 'T2' ? ' class="hilite"' : ''; $num = $idx + 1; $row = <<<ROW <tr{$hilite}> <td>{$num}</td> <td>{$team['name']}</td> <td>{$team['standing']}</td> </tr> ROW;
array_push($rows, $row); }
$partial = implode('', $rows);
$html = <<<HTML <table> <thead> <tr> <th>#</th> <th>Team name</th> <th>Standings</th> <tr> </thead> <tbody> {$partial} </tbody> </table> HTML;
echo $html;
Above code produces:
<table> <thead> <tr> <th>#</th> <th>Team name</th> <th>Standings</th> </tr><tr> </tr> </thead> <tbody> <tr> <td>1</td> <td>T1</td> <td>7</td> </tr> <tr class="hilite"> <td>2</td> <td>T2</td> <td>8</td> </tr> </tbody> </table>
Edit: This is obviously the most straightforward solution. Not necessarily the best one.
For parsing the remote content you can use something like that: http://stackoverflow.com/questions/11733876/how-to-get-content-ot-remote-html-page
|
Here is what i got so far. Note that the /* comments */ are from the guy who helped me so far and the //comments are mine.
+ Show Spoiler +<?php $url='http://wttv.click-tt.de/cgi-bin/WebObjects/nuLigaTTDE.woa/wa/groupPage?championship=WTTV+16%2F17&group=275621'; /* try to prevent errors */ libxml_use_internal_errors( true );
/* create the DOMDocument object ready to receive html from remote url */ $dom=new DOMDocument; /* use some of the defined properties for libxml */ $dom->validateOnParse=false; $dom->standalone=true; $dom->strictErrorChecking=false; $dom->recover=true; $dom->formatOutput=false;
$dom->loadHTML( file_get_contents( $url ) );
/* Capture errors */ $parse_errs=serialize( libxml_get_last_error() ); libxml_clear_errors();
/* create an X-Path object ready to query the DOM */ $xp=new DOMXPath( $dom ); /* Query to find tables with given class */ $col=$xp->query('//table[@class="result-set"]');
/* If the query succeeds, iterate through elements. Technically you could use 1 xpath query to find the table cells directly but you would have less control over whether or not to display items etc etc */ $i = 0; if( $col && !empty( $col ) ){ echo '<table id="Tabelle"> <th></th> <th>Rang</th> <th>Mannschaft</th> <th>Begegnungen</th> <th>S</th> <th>U</th> <th>N</th> <th>Spiele</th> <th>+/-</th> <th>Punkte</th>'; foreach( $col as $index => $table ){ /* Another xpath query to find the table cells and work with the data therein */ $cells=$xp->query('tr/td',$table); if( $cells && !empty( $cells ) ){ foreach( $cells as $cell ){ /* do something with the table cell data */ $i++; if ($i > 120) // number of teams times rows {break;} if ($i%10 == 1) //open new row { echo '<tr>' ; } if ($i%10 == 3) // third column { echo '<td id="column_teams">' ; //id to change the style for this column } else { echo '<td>' ; } echo $cell->nodeValue; // cell entry if ($i<11) { echo '</th>' ; // close table header for the first ten cells } else { echo '</td>' ; // close cell otherwise } if ($i%10 == 0) { echo '</tr>' ; // close row every tenth cell } } echo '</table>'; } } } ?>
Agenda: 1) Make it work for other links of this site. This means the code recognizes how many teams there are in one league and changes the number of rows but itself. 2) Add the little icons that show if you go up or down a league which are in the first column in the original but I wasnt able to add them so I left them out so far. 3) On the original site, there are two tables with the class "result-set". I only took the data from the first one by limiting the cells to number of rows times number of teams, but that is no "clean" solution, See 1). But I would also like to add the second table which shows the matches that are up next. The number of rows changes here, again. 4) Add highlight for the row which contains a specific team. (Will try that now )
|
Wait... You basically want to re-display the table from another site but highlight some row?
Why do you re-create the table manually? Just fetch entire table, output it as html and use JavaScript to add css to desired row. Much easier to do it this way.
Also, please remove the closing ?> tag if it's a php file that only contains php.
Also, why iterate over all the cells instead of iterating over rows?
|
On July 15 2016 19:44 Manit0u wrote: Wait... You basically want to re-display the table from another site but highlight some row?
Why do you re-create the table manually? Just fetch entire table, output it as html and use JavaScript to add css to desired row. Much easier to do it this way.
Also, please remove the closing ?> tag if it's a php file that only contains php.
Also, why iterate over all the cells instead of iterating over rows?
This was the only way I was able to do it. Teach me pls  As I said, I got help. After this the parser gave out the cell entries in a long list. Just: first entry of first row second entry of first row ... last entry of first row first entry of second row ... last entry of last row.
Then I formatted this to reengineer the table. How do I "just fetch the entire table"?
|
On July 15 2016 19:54 graNite wrote:Show nested quote +On July 15 2016 19:44 Manit0u wrote: Wait... You basically want to re-display the table from another site but highlight some row?
Why do you re-create the table manually? Just fetch entire table, output it as html and use JavaScript to add css to desired row. Much easier to do it this way.
Also, please remove the closing ?> tag if it's a php file that only contains php.
Also, why iterate over all the cells instead of iterating over rows? This was the only way I was able to do it. Teach me pls  As I said, I got help. After this the parser gave out the cell entries in a long list. Just: first entry of first row second entry of first row ... last entry of first row first entry of second row ... last entry of last row. Then I formatted this to reengineer the table. How do I "just fetch the entire table"?
You can do this (from your code)
$url = 'http://wttv.click-tt.de/cgi-bin/WebObjects/nuLigaTTDE.woa/wa/groupPage?championship=WTTV+16%2F17&group=275621'; /* try to prevent errors */ libxml_use_internal_errors(true);
/* create the DOMDocument object ready to receive html from remote url */ $dom = new DOMDocument; /* use some of the defined properties for libxml */ $dom->validateOnParse = false; $dom->standalone = true; $dom->strictErrorChecking = false; $dom->recover = true; $dom->formatOutput = false;
$dom->loadHTML(file_get_contents($url));
/* Capture errors */ $parse_errs = serialize( libxml_get_last_error() ); libxml_clear_errors();
/* create an X-Path object ready to query the DOM */ $xp = new DOMXPath($dom); /* Query to find tables with given class */ $col = $xp->query('//table[@class="result-set"]');
foreach ($col as $table) { echo $dom->saveHtml($table), PHP_EOL; }
You can then manipulate this with JS rather easily.
|
thank you so far! 1) In the original tables, you can click on a teams name to get more imformation about it. In your version, the link is changed from click-tt.de. I think I would rather get rid of the links at all. 2) the little icons that show the up and down ranks are linked to the wrong url as well. here it would be cool to change these links to icons my server (localhost) 3) There is another table on the same page with the same class. I dont know how to separate these two. In your version, both get parsed
![[image loading]](http://i.imgur.com/BXBe0ht.png)
just tell me how to do it, which functions i should use. you dont need to code everything (if you want you can lol)
|
Just read about the DOMDocument and DOMXPath classes in PHP.
You can easily separate the tables inside the foreach block (since it echoes all of the tables with class "result-set"). You should read about php foreach too since it'll be crucial when working with dom nodes.
|
I've added a colleague recently on Facebook. Even though I criticise Apple and their products (he is an Apple user and he also criticises Microsoft), his attacks are sometimes personal. E.g. "you only complain" or he brings up he doesn't like my programming jokes in a subtle way, etc. Do you think it's wise to unfriend him from Facebook? Does anyone have experience with this? Everyone has an opinion, but I find him annoying and I want to keep my Facebook clean from unfriendly people.
Edit: He also blamed me that he had to finish a project, which I didn't have time to finish because I booked holiday months in advance. I don't care if he knew it was in advance, but I'm not the project manager.
|
On July 16 2016 03:33 Shield wrote: I've added a colleague recently on Facebook. Even though I criticise Apple and their products (he is an Apple user and he also criticises Microsoft), his attacks are sometimes personal. E.g. "you only complain" or he brings up he doesn't like my programming jokes in a subtle way, etc. Do you think it's wise to unfriend him from Facebook? Does anyone have experience with this? Everyone has an opinion, but I find him annoying and I want to keep my Facebook clean from unfriendly people.
Edit: He also blamed me that he had to finish a project, which I didn't have time to finish because I booked holiday months in advance. I don't care if he knew it was in advance, but I'm not the project manager.
I believe "bye felecia" is the term kids are using these days
|
On July 16 2016 03:33 Shield wrote: I've added a colleague recently on Facebook. Even though I criticise Apple and their products (he is an Apple user and he also criticises Microsoft), his attacks are sometimes personal. E.g. "you only complain" or he brings up he doesn't like my programming jokes in a subtle way, etc. Do you think it's wise to unfriend him from Facebook? Does anyone have experience with this? Everyone has an opinion, but I find him annoying and I want to keep my Facebook clean from unfriendly people.
Edit: He also blamed me that he had to finish a project, which I didn't have time to finish because I booked holiday months in advance. I don't care if he knew it was in advance, but I'm not the project manager. You can also just put him on your block/don't-show-to list or whatever it's called, so whenever you post something he won't be able to see it.
|
|
|
|