As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
We're funding a new Acquisitions Incorporated series on Kickstarter right now! Check it out at https://www.kickstarter.com/projects/pennyarcade/acquisitions-incorporated-the-series-2

Git Merge Squashing [Programming] Thread : Filesystems logging stuff

11819212324100

Posts

  • bowenbowen How you doin'? Registered User regular
    edited October 2013
    My real question to you honky is what are you doing and can you give me an example?

    Are you trying to get a file name from a full path? Because there are far better ways to go about this.

    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    It sounds like what you really want is grep --invert-match

    DelmainASimPerson
  • EndEnd Registered User regular
    I think he already solved that problem anyway

    assuming he's just doing a one time thing like it sounds like he is, I probably would have just used grep or if that didn't work, writing a python script not too dissimilar to his small java code

    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
  • urahonkyurahonky Registered User regular
    It's alright guys. I have what I needed. I made a java program that took all of the code and then parsed out what I needed, and then I just ran the queries in TD and commented out the lines that failed. It was a pain but it's all done now. :D

  • KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    urahonky wrote: »
    It's like this:
    SELECT * FROM DB_AV.TABLE_1;
    SELECT * FROM DB_AV.TABLE_2;
    ....
    SELECT * FROM DB_AV.TABLE_n;
    

    If it doesn't find TABLE_3 then it just stops completely.

    Can't you add an "IF TABLE EXISTS" check? (Syntax is most likely not correct)

    bowen
  • IncindiumIncindium Registered User regular
    Rend wrote: »
    One thing that makes regex easier to stomach is to first do a pre-match pattern, where the first thing is to pare down your total body of text just to relevant stuff (usually this can be done with a more simple regex), and then you use the meaty regex on just the stuff that made it through the initial filter.

    Ironically, using regex twice instead of just once tends to severely cut down the amount of weird rules and exceptions you normally have to put into the middle your regexes.

    Yeah that is how I implemented a system that parses phone numbers and comes up with a location match. I have sets of RegEx rules in a hierachical relationship where if you match at the first rule it pares down what its looking at and passes you to the next rule in the chain. It works really well although setting up the RegEx rules to parse dialing plan rules for different countries can be a bit hairy. The cool thing is you just add new rules(and the location info) to a database table to patch support a new country's dialing plan/location info. No code changes required.

    steam_sig.png
    Nintendo ID: Incindium
    PSN: IncindiumX
  • bowenbowen How you doin'? Registered User regular
    Phone numbers, also a good scenario for regex!

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • NightslyrNightslyr Registered User regular
    Question about Bootstrap and how to use it:

    Is the idea to simply have it so you can easily put things together into a grid, but override its styles with your own? Because I'm looking at things like their navbar and whatnot, and I can't think of a site I'd build that would look like that.

    PSN/XBL/Nintendo/Origin/Steam: Nightslyr 3DS: 1607-1682-2948
    Switch: SW-3515-0057-3813 FF XIV: Q'vehn Tia
  • urahonkyurahonky Registered User regular
    Just went through and mapped 39 service calls which called a number of .XML files that contained SQL code to find out if there are any new Database/View/Table calls that we haven't mapped yet...

    15 hours and no new calls. I don't know if I should be excited that we don't have to change much or be depressed that I just wasted 15 hours.

  • EndEnd Registered User regular
    Nightslyr wrote: »
    Question about Bootstrap and how to use it:

    Is the idea to simply have it so you can easily put things together into a grid, but override its styles with your own? Because I'm looking at things like their navbar and whatnot, and I can't think of a site I'd build that would look like that.

    it seems like a lot of people do just use it without changing the look of it any

    but I think that's the idea, and at least that's how I use it

    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
    Nightslyr
  • NightslyrNightslyr Registered User regular
    End wrote: »
    Nightslyr wrote: »
    Question about Bootstrap and how to use it:

    Is the idea to simply have it so you can easily put things together into a grid, but override its styles with your own? Because I'm looking at things like their navbar and whatnot, and I can't think of a site I'd build that would look like that.

    it seems like a lot of people do just use it without changing the look of it any

    but I think that's the idea, and at least that's how I use it

    I figure that has to be it, because even the customization page doesn't give much in the way in changing the look and feel. Like navbars will always be some form of gray because you can't change that particular variable through the site before downloading. Given that the last site I built had a gradient background for its header/main nav, that kind of restriction wouldn't have worked for me.

    PSN/XBL/Nintendo/Origin/Steam: Nightslyr 3DS: 1607-1682-2948
    Switch: SW-3515-0057-3813 FF XIV: Q'vehn Tia
  • EndEnd Registered User regular
    edited October 2013
    it helps to build it yourself, and have a clean upstream branch so you can modify whatever and more easily update

    I've been using the sass port lately, since less is...less than helpful sometimes...

    Edit: also there's a theme.less or themes.less or something like that which doesn't get included by default and has some additional theming changes (like making the buttons not flat)

    End on
    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
  • bowenbowen How you doin'? Registered User regular
    I hate that my biggest problem right now is to commit smaller changes more often than large sweeping ones over the course of a day.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • NightslyrNightslyr Registered User regular
    End wrote: »
    it helps to build it yourself, and have a clean upstream branch so you can modify whatever and more easily update

    I've been using the sass port lately, since less is...less than helpful sometimes...

    Edit: also there's a theme.less or themes.less or something like that which doesn't get included by default and has some additional theming changes (like making the buttons not flat)

    I'm a complete front end newb, so please bear with me...

    'build it yourself' = ? From the bootstrap site? Somewhere else?

    Are the ports available on github, or are they something you have to build?

    I know that sass/less are ruby and/or NodeJS things... neither of which I really know anything about. I've dabbled in ruby (by dabble, I mean a single "Hello world" script).

    PSN/XBL/Nintendo/Origin/Steam: Nightslyr 3DS: 1607-1682-2948
    Switch: SW-3515-0057-3813 FF XIV: Q'vehn Tia
  • EndEnd Registered User regular
    edited October 2013
    yeah bootstrap is written in less, and you can compile less files into css files using the lessc command. You can find the bootstrap less files in the official github.

    I use a port of bootstrap to sass instead, but the principle is almost identical, but instead you use the sass command to turn .scss/.sass files into .css files.

    You don't need to know any ruby or javascript to use these tools.

    End on
    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
    Nightslyr
  • DehumanizedDehumanized Registered User regular
    edited October 2013
    http://bootswatch.com/

    I recommend that site for customizing Bootstrap. It also links to a site where a bunch of paid themes are available.

    Dehumanized on
    Nightslyr
  • urahonkyurahonky Registered User regular
    Any idea how difficult it would be to setup something to send myself an email when a twitter page posts something? I'd like to get it setup to where I get an email with Official_PAX tweets about the PAX East ticket sales.

  • bowenbowen How you doin'? Registered User regular
    http://twfeed.com/feed/twitter

    Something like that?

    Can just parse it and refresh every 20-30 minutes.

    Or in the case where you want PAX tickets, every 20-30 milliseconds.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
    urahonky
  • urahonkyurahonky Registered User regular
    Thanks browen.

    bowen
  • EchoEcho ski-bap ba-dapModerator mod
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Hmm, the APIs seem fairly simple, I might set something like that up

    bowen
  • gjaustingjaustin Registered User regular
    End wrote: »
    did
    did you not see what gjaustion said

    and the "good alternative" is to write some code to do the search yourself
    Well, he actually included code. I only knew what the answer was, not necessarily how to use it!

    And I agree with Bowen here. Sometimes you have to use RegEx (i.e. IIS URL Rewrite). But the rest of the time it's like trying to use a helicopter to drive to work in the morning.

    bowenEcho
  • urahonkyurahonky Registered User regular
    Echo wrote: »

    Doesn't seem to have anything for Twitter except "When I post or do something".

  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Helicopters are too useful. Regex is like a catapult. You have to continually tweak it just so until it gets you to the one place you need to go, and if something changes needs to be completely re-calibrated.

  • bowenbowen How you doin'? Registered User regular
    Phyphor wrote: »
    Helicopters are too useful. Regex is like a catapult. You have to continually tweak it just so until it gets you to the one place you need to go, and if something changes needs to be completely re-calibrated.

    Clearly you didn't use a mechanical protractor to lock in your angle of attack!

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • EchoEcho ski-bap ba-dapModerator mod
    urahonky wrote: »
    Echo wrote: »

    Doesn't seem to have anything for Twitter except "When I post or do something".

    Oh yeah, Twitter decided that their API didn't make them any money so they axed the useful parts of it.

  • gavindelgavindel The reason all your software is brokenRegistered User regular
    bowen wrote: »
    gavindel wrote: »
    I got a Microsoft screening interview on the second round, and I'm a bit afraid they're gonna ask all sorts of trick questions and gotchas as screening. Bowen, I'm gonna borrow your knife.

    Then, if they trick me, I'll rear up ,drive the knife into the table, and whisper softly, "NullPointerException".

    Make sure to research stack ranking and if you dislike it, and this would be a big deal, ask if it's still in practice.

    Um....

    I find this worrisome?

    Angels, innovations, and the hubris of tiny things: my book now free on Royal Road! Seraphim
    bowen
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Hey Linux people, how do you find out what the current process is in a syscall?

  • EndEnd Registered User regular
    Phyphor wrote: »
    Hey Linux people, how do you find out what the current process is in a syscall?

    you're ...in the kernel?

    I dunno, I'd say check what getpid does maybe?

    looks like it's referencing a global called "current", which is not actually a global variable at all

    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    End wrote: »
    Phyphor wrote: »
    Hey Linux people, how do you find out what the current process is in a syscall?

    you're ...in the kernel?

    I dunno, I'd say check what getpid does maybe?

    looks like it's referencing a global called "current", which is not actually a global variable at all

    That looks like what I need, thanks

  • SpawnbrokerSpawnbroker Registered User regular
    edited October 2013
    gavindel wrote: »
    bowen wrote: »
    gavindel wrote: »
    I got a Microsoft screening interview on the second round, and I'm a bit afraid they're gonna ask all sorts of trick questions and gotchas as screening. Bowen, I'm gonna borrow your knife.

    Then, if they trick me, I'll rear up ,drive the knife into the table, and whisper softly, "NullPointerException".

    Make sure to research stack ranking and if you dislike it, and this would be a big deal, ask if it's still in practice.

    Um....

    I find this worrisome?

    Welcome to the reason why good people are running from Microsoft in droves. I also did not have a good interviewing experience there, which may be coloring my views a little bit.

    Spawnbroker on
    Steam: Spawnbroker
    bowenInfidelDelmaingavindel
  • bowenbowen How you doin'? Registered User regular
    gavindel wrote: »
    bowen wrote: »
    gavindel wrote: »
    I got a Microsoft screening interview on the second round, and I'm a bit afraid they're gonna ask all sorts of trick questions and gotchas as screening. Bowen, I'm gonna borrow your knife.

    Then, if they trick me, I'll rear up ,drive the knife into the table, and whisper softly, "NullPointerException".

    Make sure to research stack ranking and if you dislike it, and this would be a big deal, ask if it's still in practice.

    Um....

    I find this worrisome?

    Welcome to the reason why good people are running from Microsoft in droves. I also did not have a good interviewing experience there, which may be coloring my views a little bit.

    Yeah @gavindel not to worry you but the corporate side of microsoft is run like a highly competitive sport.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
    Delmaingavindel
  • KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    Don't scare him too much now. In terms of large corporations, Microsoft isn't too far from the norm in the way things operate. You just need to know if that's a work environment you're okay with.

  • bowenbowen How you doin'? Registered User regular
    Pft, it's usually pretty hard to get fired in a large corporation since you're usually mostly invisible!

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
    urahonky
  • EchoEcho ski-bap ba-dapModerator mod
    edited October 2013
    Anyone used Twig for a HTML template language?

    It looked good at a first glance, but then it started getting in my way instead of out of the way, and that's not a good sign.

    Separating templates and code and all that, but it turned out to be incredibly tedious to do anything at all beyond the built-in functions/filters. I use Former to deal with HTML forms, and I saw no sane/easy way to do it the standard Blade way with "{{ Former::blah() }}".

    Am I missing something here?

    I suppose Twig is nice if you want users to be able to write templates without exposing anything but what you give them, but I don't see any use for it as the actual developer.

    Echo on
  • KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    bowen wrote: »
    Pft, it's usually pretty hard to get fired in a large corporation since you're usually mostly invisible!

    Unless you irritate the wrong person. Or your manager's manager gets in a turf war with another group and loses. Or they're going to miss earnings so they do an across the board 20% RIF and your group just finished their project and is idle.

    But yes, getting directly fired because your a screwup is harder.

    bowen
  • InfidelInfidel Heretic Registered User regular
    But yes, getting directly fired because your a screwup is harder.

    Your fired!

    OrokosPA.png
    bowen
  • EchoEcho ski-bap ba-dapModerator mod
    His fired what?

  • bowenbowen How you doin'? Registered User regular
    My a's! Nooooooooo.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • urahonkyurahonky Registered User regular
    Oh man... So that lazy dude came in today (30 minutes late) and my coworker said we should have pranked him.

    Everyone work from home and leave a note in his cube saying "furloughed".

    bowenEchoLt Muffin360mightyjongyoundergroundmonorailDelmainRawkking Goodguy
This discussion has been closed.