• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 08:56
CET 14:56
KST 22:56
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
TL.net Map Contest #21: Winners10Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11
Community News
StarCraft, SC2, HotS, WC3, Returning to Blizzcon!33$5,000+ WardiTV 2025 Championship6[BSL21] RO32 Group Stage4Weekly Cups (Oct 26-Nov 2): Liquid, Clem, Solar win; LAN in Philly2Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win10
StarCraft 2
General
Mech is the composition that needs teleportation t TL.net Map Contest #21: Winners Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win RotterdaM "Serral is the GOAT, and it's not close" 5.0.15 Patch Balance Hotfix (2025-10-8)
Tourneys
Constellation Cup - Main Event - Stellar Fest $5,000+ WardiTV 2025 Championship Sparkling Tuna Cup - Weekly Open Tournament Merivale 8 Open - LAN - Stellar Fest Sea Duckling Open (Global, Bronze-Diamond)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace
Brood War
General
[ASL20] Ask the mapmakers — Drop your questions BW General Discussion [BSL21] RO32 Group Stage BGH Auto Balance -> http://bghmmr.eu/ SnOw's ASL S20 Finals Review
Tourneys
[Megathread] Daily Proleagues [ASL20] Grand Finals [BSL21] RO32 Group B - Sunday 21:00 CET [BSL21] RO32 Group A - Saturday 21:00 CET
Strategy
Current Meta PvZ map balance How to stay on top of macro? Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile Should offensive tower rushing be viable in RTS games? Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine YouTube Thread Dating: How's your luck?
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Why we need SC3
Hildegard
Reality "theory" prov…
perfectspheres
Our Last Hope in th…
KrillinFromwales
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1426 users

The Big Programming Thread - Page 583

Forum Index > General Forum
Post a Reply
Prev 1 581 582 583 584 585 1032 Next
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.
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
Last Edited: 2015-02-09 05:19:22
February 09 2015 05:00 GMT
#11641
Yes, if you want Class3 to use the field of Class1 then you should use inheritance. Class3 extends Class1. It isn't going to see thing though; it will be able to use the myString field you created in Class1.

Alternately you should make a 'getter' method in Class1 so that Class3 can use the field of Class1.

Your example code doesn't make any sense at all. What are you trying to accomplish exactly? If you really want to learn Java you need to make something concrete; writing random snippets of code isn't going to teach you anything.
I'll always be your shadow and veil your eyes from states of ain soph aur.
meatpudding
Profile Joined March 2011
Australia520 Posts
February 09 2015 06:54 GMT
#11642
On February 09 2015 13:22 travis wrote:
java question

If I pass a reference to another instance as an argument, can I make it so that all of the methods in the new instance will recognize the fields in that reference? like for example a string in the original instance, I can print it from within the constructor of the new instance, but if I try to print it from a method that is called in that constructor, it won't work unless I pass it on as a parameter to that method as well. but that seems really redundant if I am going to be using a bunch of methods... having to put the reference as a parameter over and over. does anyone understand what I am talking about?


Why are you calling so many methods from the constructor?

If they are needed in your class then it shouldn't be too redundant if you add your string as a parameter to each one.

The other option is to save the reference as a member of the class.
Be excellent to each other.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
February 09 2015 08:43 GMT
#11643
On February 09 2015 03:27 Djagulingu wrote:
Show nested quote +
On February 09 2015 01:37 Manit0u wrote:
On February 09 2015 00:40 Djagulingu wrote:
I have this particular question in my mind: I'm building this web application which, in server side, uses nodejs to get constant stream of data from a 3rd party API and store it in my NoSQL database. I have finished developing the server side and now I'll move on with the client side. I'm wondering what I should use for the front end. I'm stuck between:

1- Front end with EmberJS and having a JSON API for database connectivity (or whatever Ember offers for that)
2- Same thing as #1, just replace EmberJS with AngularJS
3- Use Express and eliminate the need for JSON API for DB connectivity.

What are the pros and cons of each one?


You could always try some full stack framework, like MEAN. It uses NoSQL (Mongo), Express, Angular and Node so you could have it all in one neat package.

I actually want to use couchbase as the nosql database because it is lotsnlots of times faster when it comes to write operations per second and that is what my server is going to do (think of it like some guy who picks up a single paper from an endless pile of papers, stamp it and put it in another pile and thus i don't want my pile to randomly crash).


A year ago we tried to implement couchbase at work to replace some MySQL user-relationship table. It worked perfectly in simulation but instantly broke down under live load when it got 1000 write requests per second. We switched it back to MySQL fast. Since then, couchbase is a forbidden word
Djagulingu
Profile Blog Joined December 2010
Germany3605 Posts
February 09 2015 11:48 GMT
#11644
On February 09 2015 17:43 Morfildur wrote:
Show nested quote +
On February 09 2015 03:27 Djagulingu wrote:
On February 09 2015 01:37 Manit0u wrote:
On February 09 2015 00:40 Djagulingu wrote:
I have this particular question in my mind: I'm building this web application which, in server side, uses nodejs to get constant stream of data from a 3rd party API and store it in my NoSQL database. I have finished developing the server side and now I'll move on with the client side. I'm wondering what I should use for the front end. I'm stuck between:

1- Front end with EmberJS and having a JSON API for database connectivity (or whatever Ember offers for that)
2- Same thing as #1, just replace EmberJS with AngularJS
3- Use Express and eliminate the need for JSON API for DB connectivity.

What are the pros and cons of each one?


You could always try some full stack framework, like MEAN. It uses NoSQL (Mongo), Express, Angular and Node so you could have it all in one neat package.

I actually want to use couchbase as the nosql database because it is lotsnlots of times faster when it comes to write operations per second and that is what my server is going to do (think of it like some guy who picks up a single paper from an endless pile of papers, stamp it and put it in another pile and thus i don't want my pile to randomly crash).


A year ago we tried to implement couchbase at work to replace some MySQL user-relationship table. It worked perfectly in simulation but instantly broke down under live load when it got 1000 write requests per second. We switched it back to MySQL fast. Since then, couchbase is a forbidden word

Is it that bad? I mean, all those benchmarks and shit say that couchbase is much much better than mongo and cassandra when the number of client threads go up to 4 digits. I didn't stress*test it myself though.
"windows bash is a steaming heap of shit" tofucake
Zocat
Profile Joined April 2010
Germany2229 Posts
Last Edited: 2015-02-09 12:34:17
February 09 2015 12:33 GMT
#11645
On February 09 2015 13:50 travis wrote:

class1{ String mystring="blah" }

class2 {
class1 x = new class1
class3 y = new class3(x)}

class3{

class3(class1 thing){
System.out.print(thing.mystring);
method();
}

method(){
System.out.print(thing.mystring);
}}


hopefully the code is good here. I made it as simple as possible.
in this example I believe that mystring would print out as "blah" the first time, but the 2nd time method will not see thing anymore. so it won't print out mystring, it would just have an error. I am wondering if there is an easy way to make method and any other methods in class3 to see thing.



class3{
class1 thing;

class3(class1 thing){
System.out.print(thing.mystring);
this.thing = thing;
method();
}

method(){
System.out.print(thing.mystring);
}}


There are reasons against doing it this way, but it's the "easy way".
Manit0u
Profile Blog Joined August 2004
Poland17421 Posts
February 09 2015 17:07 GMT
#11646
On February 09 2015 20:48 Djagulingu wrote:
Show nested quote +
On February 09 2015 17:43 Morfildur wrote:
On February 09 2015 03:27 Djagulingu wrote:
On February 09 2015 01:37 Manit0u wrote:
On February 09 2015 00:40 Djagulingu wrote:
I have this particular question in my mind: I'm building this web application which, in server side, uses nodejs to get constant stream of data from a 3rd party API and store it in my NoSQL database. I have finished developing the server side and now I'll move on with the client side. I'm wondering what I should use for the front end. I'm stuck between:

1- Front end with EmberJS and having a JSON API for database connectivity (or whatever Ember offers for that)
2- Same thing as #1, just replace EmberJS with AngularJS
3- Use Express and eliminate the need for JSON API for DB connectivity.

What are the pros and cons of each one?


You could always try some full stack framework, like MEAN. It uses NoSQL (Mongo), Express, Angular and Node so you could have it all in one neat package.

I actually want to use couchbase as the nosql database because it is lotsnlots of times faster when it comes to write operations per second and that is what my server is going to do (think of it like some guy who picks up a single paper from an endless pile of papers, stamp it and put it in another pile and thus i don't want my pile to randomly crash).


A year ago we tried to implement couchbase at work to replace some MySQL user-relationship table. It worked perfectly in simulation but instantly broke down under live load when it got 1000 write requests per second. We switched it back to MySQL fast. Since then, couchbase is a forbidden word

Is it that bad? I mean, all those benchmarks and shit say that couchbase is much much better than mongo and cassandra when the number of client threads go up to 4 digits. I didn't stress*test it myself though.


http://labs.octivi.com/handling-1-billion-requests-a-week-with-symfony2/

That's how you do it.
Time is precious. Waste it wisely.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
February 09 2015 17:50 GMT
#11647
On February 10 2015 02:07 Manit0u wrote:
Show nested quote +
On February 09 2015 20:48 Djagulingu wrote:
On February 09 2015 17:43 Morfildur wrote:
On February 09 2015 03:27 Djagulingu wrote:
On February 09 2015 01:37 Manit0u wrote:
On February 09 2015 00:40 Djagulingu wrote:
I have this particular question in my mind: I'm building this web application which, in server side, uses nodejs to get constant stream of data from a 3rd party API and store it in my NoSQL database. I have finished developing the server side and now I'll move on with the client side. I'm wondering what I should use for the front end. I'm stuck between:

1- Front end with EmberJS and having a JSON API for database connectivity (or whatever Ember offers for that)
2- Same thing as #1, just replace EmberJS with AngularJS
3- Use Express and eliminate the need for JSON API for DB connectivity.

What are the pros and cons of each one?


You could always try some full stack framework, like MEAN. It uses NoSQL (Mongo), Express, Angular and Node so you could have it all in one neat package.

I actually want to use couchbase as the nosql database because it is lotsnlots of times faster when it comes to write operations per second and that is what my server is going to do (think of it like some guy who picks up a single paper from an endless pile of papers, stamp it and put it in another pile and thus i don't want my pile to randomly crash).


A year ago we tried to implement couchbase at work to replace some MySQL user-relationship table. It worked perfectly in simulation but instantly broke down under live load when it got 1000 write requests per second. We switched it back to MySQL fast. Since then, couchbase is a forbidden word

Is it that bad? I mean, all those benchmarks and shit say that couchbase is much much better than mongo and cassandra when the number of client threads go up to 4 digits. I didn't stress*test it myself though.


http://labs.octivi.com/handling-1-billion-requests-a-week-with-symfony2/

That's how you do it.


That's just 1650 requests a second and most likely most of them are read-only, though the actual use case wasn't explained. It's so easy to make numbers sound big and impressive when most you are doing is sending out the same webpage out again and again from a cache.
SpiZe
Profile Joined December 2010
Canada3640 Posts
February 09 2015 19:46 GMT
#11648
Anyone here has experience with SSL certificates ?

I have a database with 430k entries of PEM encoded certificates, that I need to decode and store back into another DB with a more logical structure (issuer, encrytion algorithm, start date, end date and so on). I can decode .crt file into text then I can parse through that text to find the info the I need. However, since I need to create .crt files to read them and then parse the result and store it in my database.... this seems terribly inefficient.

I'm inexperienced with both SSL certificates and data sets of that size so I don't even really know where am I going to be honest. If anyone has a vague idea, I'm not looking for a step by step, just some random thoughts if you have any.
phar
Profile Joined August 2011
United States1080 Posts
February 10 2015 01:41 GMT
#11649
travis, you may benefit from a read through Effective Java by Bloch.
Who after all is today speaking about the destruction of the Armenians?
Khalum
Profile Joined September 2010
Austria831 Posts
February 10 2015 01:42 GMT
#11650
This might be a long shot but I guess it's worth a try:

At work we are officially still using vs 2008 (c++) which is obviously quite dated. Last Friday I was kinda out of work for the week and started investigating into how to make our code build with vs 2013. Most of our 3rd party libraries are more or less up to date and built immediately. Others (some of our older solutions still use Qt4.4.3 and Coin3D/SoQt) were a bit more tricky but I managed to make these build too. So after spending some hours over the weekend and the better part of today I actually managed to make everything build. I didn't run any tests yet though so I'm not sure what actually broke.

I found some lists on the internet giving hints about what to look for - some includes that changed, the changed keyword auto, .... stuff like that. I have compiled a list of stuff to check and fix if required. But has anyone here actually done this before and found out some secret traps that I might also fall into?
Kiarip
Profile Joined August 2008
United States1835 Posts
Last Edited: 2015-02-10 03:09:22
February 10 2015 02:54 GMT
#11651
On February 10 2015 04:46 SpiZe wrote:
Anyone here has experience with SSL certificates ?

I have a database with 430k entries of PEM encoded certificates, that I need to decode and store back into another DB with a more logical structure (issuer, encrytion algorithm, start date, end date and so on). I can decode .crt file into text then I can parse through that text to find the info the I need. However, since I need to create .crt files to read them and then parse the result and store it in my database.... this seems terribly inefficient.

I'm inexperienced with both SSL certificates and data sets of that size so I don't even really know where am I going to be honest. If anyone has a vague idea, I'm not looking for a step by step, just some random thoughts if you have any.


Can you just pipe the data through with a script without having to create all the extra files? The bottle-neck would probably be in writing everything to disk, so you can avoid that since an SSL cert is more than small enough to be stored in RAM.

On February 08 2015 18:08 nunez wrote:
help please.

i need a word with the following meaning:
a statement that is not an expression.
all i got is: NonExpression... NExpression... Nexpression...

for now i'm going with Nexpression.


I don't know the context of what you're doing, but

premise, statement, state, set, condition.?
teamamerica
Profile Blog Joined July 2010
United States958 Posts
February 10 2015 06:05 GMT
#11652
Hey all - I barely code Java so this is probably old news but I was looking at some java collections extensions - so nice to use~ It's like my python (no comprehensions but I'll survive) + autocompleting since static types. Plus there are some fun exercises they give to expose it. I was looking specifically at goldman-sachs collections but I guess there's also Guava (with a whole lot more then just collections) and fastuil as some others.

The gs collections api (from my 2 minute of using it) just seems so nice to use...

Also frustrations from work = everyone using hashmap in multithreaded environment = infinite loop = sadness
RIP GOMTV. RIP PROLEAGUE.
Manit0u
Profile Blog Joined August 2004
Poland17421 Posts
Last Edited: 2015-02-10 07:58:24
February 10 2015 07:57 GMT
#11653
On February 10 2015 02:50 Morfildur wrote:
Show nested quote +
On February 10 2015 02:07 Manit0u wrote:
On February 09 2015 20:48 Djagulingu wrote:
On February 09 2015 17:43 Morfildur wrote:
On February 09 2015 03:27 Djagulingu wrote:
On February 09 2015 01:37 Manit0u wrote:
On February 09 2015 00:40 Djagulingu wrote:
I have this particular question in my mind: I'm building this web application which, in server side, uses nodejs to get constant stream of data from a 3rd party API and store it in my NoSQL database. I have finished developing the server side and now I'll move on with the client side. I'm wondering what I should use for the front end. I'm stuck between:

1- Front end with EmberJS and having a JSON API for database connectivity (or whatever Ember offers for that)
2- Same thing as #1, just replace EmberJS with AngularJS
3- Use Express and eliminate the need for JSON API for DB connectivity.

What are the pros and cons of each one?


You could always try some full stack framework, like MEAN. It uses NoSQL (Mongo), Express, Angular and Node so you could have it all in one neat package.

I actually want to use couchbase as the nosql database because it is lotsnlots of times faster when it comes to write operations per second and that is what my server is going to do (think of it like some guy who picks up a single paper from an endless pile of papers, stamp it and put it in another pile and thus i don't want my pile to randomly crash).


A year ago we tried to implement couchbase at work to replace some MySQL user-relationship table. It worked perfectly in simulation but instantly broke down under live load when it got 1000 write requests per second. We switched it back to MySQL fast. Since then, couchbase is a forbidden word

Is it that bad? I mean, all those benchmarks and shit say that couchbase is much much better than mongo and cassandra when the number of client threads go up to 4 digits. I didn't stress*test it myself though.


http://labs.octivi.com/handling-1-billion-requests-a-week-with-symfony2/

That's how you do it.


That's just 1650 requests a second and most likely most of them are read-only, though the actual use case wasn't explained. It's so easy to make numbers sound big and impressive when most you are doing is sending out the same webpage out again and again from a cache.


It was mentioned that it was some e-commerce stuff. The focus of the article was actually the design part, not actual implementation.
Time is precious. Waste it wisely.
bangsholt
Profile Joined June 2011
Denmark138 Posts
February 10 2015 19:56 GMT
#11654
On February 10 2015 15:05 teamamerica wrote:
Hey all - I barely code Java so this is probably old news but I was looking at some java collections extensions - so nice to use~ It's like my python (no comprehensions but I'll survive) + autocompleting since static types. Plus there are some fun exercises they give to expose it. I was looking specifically at goldman-sachs collections but I guess there's also Guava (with a whole lot more then just collections) and fastuil as some others.

The gs collections api (from my 2 minute of using it) just seems so nice to use...

Also frustrations from work = everyone using hashmap in multithreaded environment = infinite loop = sadness


It seems very nice yes... Too bad they didn't integrate with Guava - then it would've been perfect :D
Manit0u
Profile Blog Joined August 2004
Poland17421 Posts
Last Edited: 2015-02-12 11:39:40
February 11 2015 13:22 GMT
#11655
"Anti-pattern" new hit singleton by DI SOLID GRASP feat. MVC DRY KISS

[image loading]

On a side note, I've found something cool:


class Demo.HelloWorld : GLib.Object {

public static int main(string[] args) {

stdout.printf("Hello, World\n");

return 0;
}
}


It's like if C had a baby with Java. Just discovered it but I'm liking what I'm seeing so far.


/* atomic types */
unichar c = 'u';
float percentile = 0.75f;
const double MU_BOHR = 927.400915E-26;
bool the_box_has_crashed = false;

/* defining a struct */
struct Vector {
public double x;
public double y;
public double z;
}

/* defining an enum */
enum WindowType {
TOPLEVEL,
POPUP
}


It's a language called Vala.
Time is precious. Waste it wisely.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
February 12 2015 12:58 GMT
#11656
I have an interesting problem that I'm trying to think through:

At work we need a realtime scheduling system where events can be scheduled to happen e.g. 5 seconds from now or theoretically 5 month, 4 days, 3 hours, 2 minutes and 1 second from now, though most events are scheduled for at most a week in the future. The number of scheduled events potentially numbers in the 1000s for every single second, i.e. a span of 10 seconds can have a total of 50000+ scheduled events. Past events have to be processed as long as they aren't past their TTL, i.e. when the schedule misses 10s due to a restart or hiccup, all those events still have to get processed.

Until recently we used a database with a "update X set processed=workerid where processed is null" statement that the ~100 worker processes executed whenever they ran out of jobs. It was far too slow eventhough a garbage collector held the table as small as possible by removing all finished events. We then switched to a Redis based solution, which can handle it but occasionally runs into performance issues as well.

I've now decided that it would be a nice problem to use to get back into C++, so I've started developing a C++ service that takes care of the scheduling. I'm just thinking about how to store the data internally so it is efficient for those large numbers of events. The service just has 2 functions: ScheduleEvent and GetNextEvent. ScheduleEvent adds an event at any point in time, GetNextEvent returns the next scheduled event based on time, variable time-to-live and event priority

I'm currently using a std::map<int, std::vector<Item>*> with the map key being the timestamp and the vector containing the items, but I'm having trouble with the time it takes to seek through the vectors, especially after the workers stopped processing for a few seconds and many events went past their TTL.
windzor
Profile Joined October 2010
Denmark1013 Posts
February 12 2015 13:18 GMT
#11657
On February 12 2015 21:58 Morfildur wrote:
I have an interesting problem that I'm trying to think through:

At work we need a realtime scheduling system where events can be scheduled to happen e.g. 5 seconds from now or theoretically 5 month, 4 days, 3 hours, 2 minutes and 1 second from now, though most events are scheduled for at most a week in the future. The number of scheduled events potentially numbers in the 1000s for every single second, i.e. a span of 10 seconds can have a total of 50000+ scheduled events. Past events have to be processed as long as they aren't past their TTL, i.e. when the schedule misses 10s due to a restart or hiccup, all those events still have to get processed.

Until recently we used a database with a "update X set processed=workerid where processed is null" statement that the ~100 worker processes executed whenever they ran out of jobs. It was far too slow eventhough a garbage collector held the table as small as possible by removing all finished events. We then switched to a Redis based solution, which can handle it but occasionally runs into performance issues as well.

I've now decided that it would be a nice problem to use to get back into C++, so I've started developing a C++ service that takes care of the scheduling. I'm just thinking about how to store the data internally so it is efficient for those large numbers of events. The service just has 2 functions: ScheduleEvent and GetNextEvent. ScheduleEvent adds an event at any point in time, GetNextEvent returns the next scheduled event based on time, variable time-to-live and event priority

I'm currently using a std::map<int, std::vector<Item>*> with the map key being the timestamp and the vector containing the items, but I'm having trouble with the time it takes to seek through the vectors, especially after the workers stopped processing for a few seconds and many events went past their TTL.


Why don't you have a structure for jobs to be processed, and a structure for jobs to be scheduled in the future?

You have one worker thread which wakes up every second to move jobs from scheduled queue to processing queue.

Then you only have to worry about optimizing adding elements to the queue. If it's a sorted queue removing the items is easily done.
Yeah
Manit0u
Profile Blog Joined August 2004
Poland17421 Posts
February 12 2015 15:12 GMT
#11658
I wonder if it would be possible to use fcron for that...
Time is precious. Waste it wisely.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2015-02-12 19:07:43
February 12 2015 19:03 GMT
#11659
am having some fun with gcc plugin and access to ast,
can make explicit my earlier point about the implicit argument
of class methods.

+ Show Spoiler [class definition] +
class Class{
private:
int member;
public:
void operator()(int _member){member=_member;}
int operator()()const{return member;}
};


+ Show Spoiler [gcc plugin output] +
[jeh@gimli tl]$ g++ -I../ -std=c++14 -fplugin=../ast/ast.so -fdiagnostics-color=always -c tl.cpp
starting ast
processing: tl.cpp

class ::Class at tl.cpp:1
method name: operator()
return type: void
arg: Class* this
arg: int _member

method name: operator()
return type: int
arg: Class* this


glorious gcc!
messy codesnippet, this is covering new ground for me...
+ Show Spoiler [plugin print method code] +
... //type is a class node
for(
tree method=TYPE_METHODS(type); //iterate through all methods of class
method!=0;
method=TREE_CHAIN(method)
){
if(!DECL_ARTIFICIAL(method)){ //skip implicitly declared functions (ctors etc...)
cerr <<"\tmethod name: "
<<IDENTIFIER_POINTER(DECL_NAME(method))
<<endl;

tree return_type=TREE_TYPE(TREE_TYPE(method));
cerr <<"\t\treturn type: "
<<IDENTIFIER_POINTER(DECL_NAME(TYPE_NAME(return_type)))
<<endl;

for( //iterate through argument declarations of method
tree arg_decl=DECL_ARGUMENTS(method);
arg_decl!=NULL;
arg_decl=TREE_CHAIN(arg_decl)
){

tree arg_type=TREE_TYPE(arg_decl);
bool is_ptr=false;
if(TREE_CODE(arg_type)==POINTER_TYPE){
arg_type=TREE_TYPE(arg_type);
is_ptr=true;
}
cerr <<"\t\targ: "
<<IDENTIFIER_POINTER(DECL_NAME(TYPE_NAME(arg_type)))
<<(is_ptr?"* ":" ");

cerr <<IDENTIFIER_POINTER(DECL_NAME(arg_decl))
<<endl;

}
cerr<<endl;
}
}

...
conspired against by a confederacy of dunces.
windzor
Profile Joined October 2010
Denmark1013 Posts
February 12 2015 20:18 GMT
#11660
On February 13 2015 00:12 Manit0u wrote:
I wonder if it would be possible to use fcron for that...


Maybe, but then you would have to keep all your bookkeeping on disk, which means you will have to throw performance away.

Is it a requirement that your scheduling is persistence across system reboots? What happens if system goes down while running a job?
Yeah
Prev 1 581 582 583 584 585 1032 Next
Please log in or register to reply.
Live Events Refresh
CranKy Ducklings
10:00
Sea Duckling Open #140
CranKy Ducklings84
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 198
Railgan 42
Creator 14
StarCraft: Brood War
Sea 6776
Horang2 4135
GuemChi 1585
Jaedong 890
actioN 290
Mini 250
BeSt 249
Soma 228
Killer 218
EffOrt 205
[ Show more ]
Rush 172
Mind 105
Hyun 95
Bonyth 72
ToSsGirL 67
Backho 60
PianO 34
JYJ32
sas.Sziky 32
Aegong 28
zelot 23
Terrorterran 14
soO 11
sorry 10
HiyA 7
Sacsri 7
Dota 2
Gorgc5272
singsing2292
qojqva1976
Dendi596
XcaliburYe219
BananaSlamJamma107
Heroes of the Storm
Khaldor214
Other Games
B2W.Neo1235
Sick275
Lowko237
Fuzer 197
Hui .121
XaKoH 87
nookyyy 56
MindelVK20
Organizations
StarCraft 2
WardiTV622
Counter-Strike
PGL231
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• StrangeGG 73
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 2101
League of Legends
• Stunt689
• HappyZerGling108
Upcoming Events
IPSL
4h 4m
dxtr13 vs OldBoy
Napoleon vs Doodle
LAN Event
4h 4m
Lambo vs Clem
Scarlett vs TriGGeR
ByuN vs TBD
Zoun vs TBD
BSL 21
6h 4m
Gosudark vs Kyrie
Gypsy vs OyAji
UltrA vs Radley
Dandy vs Ptak
Replay Cast
9h 4m
Sparkling Tuna Cup
20h 4m
WardiTV Korean Royale
22h 4m
LAN Event
1d 1h
IPSL
1d 4h
JDConan vs WIZARD
WolFix vs Cross
BSL 21
1d 6h
spx vs rasowy
HBO vs KameZerg
Cross vs Razz
dxtr13 vs ZZZero
Replay Cast
1d 19h
[ Show More ]
Wardi Open
1d 22h
WardiTV Korean Royale
2 days
Replay Cast
3 days
Kung Fu Cup
3 days
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
4 days
The PondCast
4 days
RSL Revival
4 days
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
4 days
WardiTV Korean Royale
4 days
RSL Revival
5 days
Classic vs Creator
Cure vs TriGGeR
Kung Fu Cup
5 days
CranKy Ducklings
6 days
RSL Revival
6 days
herO vs Gerald
ByuN vs SHIN
Kung Fu Cup
6 days
Liquipedia Results

Completed

BSL 21 Points
SC4ALL: StarCraft II
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
Stellar Fest: Constellation Cup
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual

Upcoming

SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
META Madness #9
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.