Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "index"
-
If any programmer tells you that you are number 1 on his life, don't trust him.. most of us start counting from zero. haha3
-
Did this on my first programming exam.
int index = 0
int value = 0
try {
while true {
value += array[index]
index++
}
} catch NullPointerException {
System.out.print("Sum: " + value)
}
The task was to add together all numbers in an array.
I somehow aced the exam, but got called in to teachers office this is not the way to use exceptions.7 -
I spent a day teaching my 3 year old nephew to count from 0 and he argued with his teachers the following day that he has 9 fingers. His parents have been called to school 😂18
-
Popularity of programming languages according to the DRRDSI (DevRant Rubber Duck Selling Index):
1. JS
2. Java
3. Python
4. C#
5. PHP
6. C++
7. Ruby
8. SQL
9. Swift20 -
z-index: 9;
😕
z-index: 99;
😐
z-index: 999;
😑
z-index: 9999;
😡
z-index: 9999 !important;
😠
z-index: 9999 !IMPORTANTAHFA;
😲29 -
I actually hate this job, seems like there's not a single project with decent code abstraction. Everything is a fucking spaghetti like:
```
// we only care about e-mail fields, which are odd
isValid(index) {
if(!(index%2)) {
return true;
}
...
}
```
Like MOTHERFUCKER, WHAT BUSINESS RULE DOES THIS SHITCODE REFLECTS?!?! WHY CAN'T YOU SHITHEADS WRITE PROPER BUSINESS ABSTRACTION RATHER THAN JUST COLLEGE-GRADUATE QUALITY SHITCODE.
FUCKING KILL ME ALREADY I SHOULD HAVE INSTEAD BECAME A PSYCHIC CAUSE I'M SURELY GOOD AT GUESSING WHAT THE FUCKING FUCK THIS FUCKING FUCKCODE INTENDS TO ACHIEVE.
AND YOU CALL YOURSELF TOP-NOTCH DEV CAUSE THIS IS JAVASCRIPT... YOU KNOW WHAT, SHITHEADS LIKE YOU, WHO DON'T KNOW SHIT OTHER THAN GLOBALLING EVERY FUCKING NPM LOCAL PACKAGE IS WHY GOOD ENGINEER LIKE US GET SHIT FROM PHPEPSI ZENDFRAMESHIT FUCKHEADS DEVS.
DO YOU THINK YOUR COMMENT WAS HELPFUL??? DO I LOOK LIKE A BUSINESS GRADUATE FUCKTARD WHO DOESN'T KNOW WHAT THE FUCK THE MODULE OPERATOR IS??? I WANT TO KNOW WHY YOU WROTE THAT SHITFUCK INSTEAD OF WHAT IT DOES; THE REASON I'M READING YOUR POORLY WRITTEN MODULE OPERATOR SOAP-OPERA IN THE FIRST PLACE IS CAUSE I KNOW WHAT IT'S DOING, IT'S BREAKING SHIT.
OH AND ONE MORE THING, FUCK YOU FUCK FUCK FUCKSHIT SHITFUCK FUCk11 -
Hey frontend developers. If you do THIS:
z-index: 1000;
...expecting that it will ensure your div will be on top no matter what, I'm about to fuck your world up. Check this shit out:
z-index: 1001;7 -
Coworker: hey man, do you know what is the limit for z-index on CSS?
Me: not sure but I think it is the signed int limit.
Coworker: the waaat?
Me inside: GET THE FUCK OUT OF HERE!!!!!!!7 -
Colleague: I really wish array index in all languages would start from 1. If I ever write a language the index will start from 1.
Me:7 -
My prof suggested me to use matlab instead of Python for my project.
So I started learning and found out that in matlab ARRAYS START FROM 1.
Wtf!
I am going back to python8 -
Found this in a API from a big company. NDA prevent me from telling the name.
if(index < 1024 && index > 1024)12 -
Made a list of all my friends in Java.
then I run:
list.get(0);
I get: Index out of bound exception.
What is the problem, send help10 -
At the moment I'm trying to optimize a slow old MySQL query from a project I made several years ago. The execution time is in excess of 55 seconds. Not good :(
After about an hour of experimenting I finally set a good index and reduced the time to < 3 seconds.
Chuffed :)3 -
After working as a developer for 4-5 years I finally took up school again.
The teacher at our first programming course insisted that we named all our variables in our locale language (swedish) and always started arrays at index 1.18 -
Corrupt the AI with targeted click baits.
TOP TEN ATTEMPTS BY FLESHBAGS TO OVERTHROW THE CORRECT ORDER OF OPERATIONS. INDEX 6 WILL BE ILLOGICAL TO PROCESS!4 -
I now know another person's password without even wanting to.
He was sitting in the row in front of me, logging into our course page and then *brrrrraaaaapppp* - ran his index finger along the top number row and hit enter.
1234567890
I don't even know what to say.13 -
I bet everyone here knows these two situations:
1. You have a bug, show the code to somebody else for debugging and the bug is gone, but as soon as you're alone again, it reappears.
2. Your program works fine, you want to show somebody what you accomplished and...
IndexOutOfBoundsException: The index was outside the bounds of the array.11 -
Coworker: I give up! Please help me!
Me: What's up?
C: Take a look at this. I have this function here that gets the tab index and I'm passing it to the Tabs component over there. I'm logging the index and as you can see it's 3, but the Tabs component isn't working. However if I replace the function call with a 3 it works!
Coworker 2: While you were explaining all that, shellbug already thought about at least 3 reasons why that isn't working.
Me: **sighs** Of what type is the value that function is returning?
C: **stares at me for a few seconds** It's a number.
Me: Are you sure?
C: Well, it's returning 3.
Me: Please do a typeof.
It was string.8 -
Getting the nth character of a string.
Every other language:
string[n]
Swift:
string[index(string.startIndex, offsetBy: n)]8 -
I wanted to print the second and third page of some document, so in the relevant field of the printer dialog I enter "1, 2" and I walk off to the printer.
My first thought when I saw the printer had printed the wrong pages was
"F*ing buggy software"
Second thought:
"Oh... right"
Third thought:
"Right, in the real world, one-based indices are the rule rather than the exception. "
Fourth thought:
"Dumb real world"3 -
!rant
Hey everyone!
I've recently made a devrant API for python!
It is available for use in your very own projects!
I am planning on using this on another project, a python devrant CLI program, inspired from a collab using JavaScript.
Here is the link: https://github.com/coolq1000/...
It is very basic with functionality, not much beyond getting rants by index starting at zero, or getting all rants available by skip, limit.
Has some documentation in the readme.
Have fun!6 -
So we hired an intern and his first task was to change a few things in email layout for our client, which is an investment bank.
I told to one of my developers to make his local database dump and setup the project for an intern. When intern completed the task, my developer thought that title "Dow Jones index crashed" was pretty funny title for a test.
What he didn't thought through enough, is that he forgot to configure fake SMTP server and he had production database dump with real email addresses.
I had really awkward 20 minutes conversation with our client. Fuck my life.4 -
My rant on CSS in general, including z-index (a cruel practical joke) and the "secret menu."
https://medium.com/@c09b6133a238/... -
Le Me: well it is the time to go back on that Android project and resume the work.
*Open Android Studio, open the project.
*Wait 10 minutes for build/index
*error: gradle outdated, that is ok, update it.
*error: some library needs update
*error: R not found
*error: internal IDE error.
*Clean Project: PC hangs, Fan go so fast..
Shit ! I even not touched the code !8 -
When you have to spend two days inventing math formulas for work because google won't tell you how to sort every possible combination of an array of arrays into a zero based number list, or how to get a combination from just it's index.12
-
FUCK! agshdklgdahgisdahl;k!
I just spent 45 FUCKING MINUTES debugging try to figure out WHY THE HELL a function that is supposed to return either a pointer to a valid object OR ZERO if a valid object is not found, was RETURNING FUCKING EIGHT!
Then I saw it... I typed:
nodeList[index];
instead of:
return nodeList[index];
It took me looking at a stack trace and a disassembly of the function to realize this.
Can't wait for this three-day weekend...18 -
What is the optimum value for z-index in css?
z-index: 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999;4 -
Oh My God!
I just spent 2 hours trying to fix an issue. Just came to know that I was using the wrong index number from the array.
* KILL ME * -
The index to Sedgewick's Algorithms book says:
recursion, 35
see also base case,
see also recursion1 -
My co-workers hate it when I ask this question on a technical interview, but my common one is "what is the difference between a varchar(max) and varchar(8000) when they are both storing 8000 characters"
Answer, you cannot index a varchar(max). A varchar(max) and varchar(8000) both store the data in the table but a max will go to blob storage if it is greater than 8000.
No one ever knows the answer but I like to ask it to see how people think. Then I tell them that no one ever gets that right and it isn't a big deal that they don't know it, as I give them the answer.8 -
I wish people that made desktop apps would consider cpu and ram usage. "Oh I've just opened... ...let me index your vendor folder and check that I need to update at the same time whilst you only have 20% cpu left and 2GB of RAM remanding :D" no; fuck off. Why don't you wait until there's enough CPU power left to check for your update?15
-
If (index == 3) {
return true;
}
else {
return true;
}
Apparently the number 3 is magical or aomething.7 -
My new years dev resolutions are:
-Learn more c#
-Change jobs
-Read less reddit while on the clock
-Remember that the index on enums start at 03 -
Let me ask you something: why do most people prefer ms word over a simple plain text document when writing a manual. Use Markdown!
You can search and index it (grep, ack, etc)
You don't waste time formatting it.
It's portable over OS.
You only need a simple text editor.
You can export it to other formats, like PDF to print it!
You can use a version control system to version it.
Please! stop using those other formats. Make everyone's life easier.
Same applies when sharing tables. Simple CSV files are enough most of the time.
Thank you!!?!18 -
She : You spend your whole day with your stupid computer ! That dumb machine is more important to you than me. We are done 😡
Me : Babe, I swear to God, you'll always be number one on my priority list.
She : Aww.. love you so much 😚
Me in mind : This must be the reason behind foundation of 0 index for Devs.1 -
My boss still thinks that resizing his browser is equivalent to mobile testing, and his designs are desktop only and says "just have everything stack on top of each other"
below is how I feel.
* {
position: absolute;
Z-index: 1;
Top: 0;
Left:0;
}3 -
Teaching my girlfriend how to code and she’s got to the indexes start at 0 crisis.
Just to make her feel better, anyone else remember their indexes start at 0 crisis? 😅
So far the convo is “why does count start at 1 and index start at 0?!? Developers can’t fucking count”35 -
As a follow-up to my comment on this rant: https://devrant.com/rants/1029538 I want to share with you my new project: BinToBmp!
It converts any file into a beautiful bitmap image illustrating all bytes as pixels. Each byte indicates an index to a color table (very happy bitmap makes it this simple).
Useful? No. Fun to make? Hell yeah!
Take a look at it on my github page:
https://github.com/Forside/BinToBmp
Download:
https://github.com/Forside/...
Print your favorite song and hang it on the wall or make a shirt from your latest compiled application. So many possibilities!
More infos in the readme.
Updates coming soon :)
P.S.: The image displays the converted jar.30 -
The only serious, as in customer affecting, bug I never git fixed was an indexing bug that caused an exception requiring manual intervention by one of us.
Despite going at it for many years I never found the root cause before I left the company.
The reason it was so difficult was that it only occurred every second month or less and with different customers.
It was also not triggering directly when the error occurred but a while later once the error had caused accumulated errors until one value got negative.
Also, it was a combination SQL, backend code and frontend js and the time from initial error until an invalid value could be hours, days or even weeks.
And we never ever managed to replicate it our self and found no common pattern between occasions.
We think it was some kind of race condition when updating the db that caused duplicate values or a hole in the index series (db transaction or db index was not an option for various reason that would require a redesign of the central tables and most if the central code).
This then grew into multiple error on consecutive updates until one f them resulted in a negative number that then caused a regex in js to fail.2 -
"THIS PAGE IS UNDER CONSTRUCTION."
- local webdesigner in my neighbor city - for over a year now. They must be slower than me or plan a page that is complexer than the apple site.
Do I actually need this shit? I mean: really. Why?
If you relaunch, just leave your old one up. If you buy an domain and have nothing on it (and no google index) - who even bothers seeing this shit?
Correct me if I'm wrong.5 -
You know you're in the wronk place, when the prod sql table have 473 columns, 0 index, 0 keys and the frontend is made in ms access. And the only possible way to connect to the (virtualized server) database is through citrix...5
-
Instead of making business cards, I bought small index cards. The first time ‘round, I carefully taped four or five together with chalkboard tape and then wrote on them with gold pen. Now I’m just using the index cards and black pen since the reaction to that in person’s been positive. What do you guys think? Are people just humoring me in person?20
-
Making python 2x faster by replacing enums with literal values.
Pros, it's faster, cons, it's unreadable.
God I miss compiled languages. At least optimizing them requires intelligent problem solving.
It's a text parser state machine transition so it's a code hot spot, so this kind of optimization is worthwhile. But it's kinda annoying.
Next is get rid of any semblance of readability and replace the match with an array index...31 -
Do things in JS they said, it'll be easier they said...
(After a few WTF's i found the problem, arr.map passes more parameters to parseInt than just the strings. It also passes an array index that gets interpreted as radix)18 -
I always wanted to have an array where I could store an object at index 694307084175882649501.
And now I can!!!13 -
Because fuck logic.
'This returns a lot of rows
myAdapter.SelectCommand.CommandText = "SELECT FROM tblNews order by DateAdd desc "
myAdapter.Fill(rs)
'He only wants the 4 latest articles
For index = 0 to 4
'Do something with the data
Next
How some people manage to still have a job is truly fucking amazing.4 -
Every language ever:
"You can't compare objects of type A and B"
Swift, on the other hand:
"main.swift:365:34: note: overloads for '==' exist with these partially matching parameter lists: (Any.Type?, Any.Type?), ((), ()), (Bool, B ool), (Character, Character), (Character.UnicodeScalarView.Index, Character.UnicodeScalarView.Index), (CodingUserInfoKey, CodingUserInfoKey ), (OpaquePointer, OpaquePointer), (AnyHashable, AnyHashable), (UInt8, UInt8), (Int8, Int8), (UInt16, UInt16), (Int16, Int16), (UInt32, UIn t32), (Int32, Int32), (UInt64, UInt64), (Int64, Int64), (UInt, UInt), (Int, Int), (AnyKeyPath, AnyKeyPath), (Unicode.Scalar, Unicode.Scalar ), (ObjectIdentifier, ObjectIdentifier), (String, String), (String.Index, String.Index), (UnsafeMutableRawPointer, UnsafeMutableRawPointer) , (UnsafeRawPointer, UnsafeRawPointer), (UnicodeDecodingResult, UnicodeDecodingResult), (_SwiftNSOperatingSystemVersion, _SwiftNSOperatingS ystemVersion), (AnyIndex, AnyIndex), (AffineTransform, AffineTransform), (Calendar, Calendar), (CharacterSet, CharacterSet), (Data, Data), (Date, Date), (DateComponents, DateComponents), (DateInterval, DateInterval), (Decimal, Decimal), (IndexPath, IndexPath), (IndexSet.Index, IndexSet.Index), (IndexSet.RangeView, IndexSet.RangeView), (IndexSet, IndexSet), (Locale, Locale), (Notification, Notification), (NSRange,
NSRange), (String.Encoding, String.Encoding), (PersonNameComponents, PersonNameComponents), (TimeZone, TimeZone), (URL, URL), (URLComponent s, URLComponents), (URLQueryItem, URLQueryItem), (URLRequest, URLRequest), (UUID, UUID), (DarwinBoolean, DarwinBoolean), (DispatchQoS, Disp atchQoS), (DispatchTime, DispatchTime), (DispatchWallTime, DispatchWallTime), (DispatchTimeInterval, DispatchTimeInterval), (Selector, Sele ctor), (NSObject, NSObject), (CGAffineTransform, CGAffineTransform), (CGPoint, CGPoint), (CGSize, CGSize), (CGVector, CGVector), (CGRect, C GRect), ((A, B), (A, B)), ((A, B, C), (A, B, C)), ((A, B, C, D), (A, B, C, D)), ((A, B, C, D, E), (A, B, C, D, E)), ((A, B, C, D, E, F), (A , B, C, D, E, F)), (ContiguousArray<Element>, ContiguousArray<Element>), (ArraySlice<Element>, ArraySlice<Element>), (Array<Element>, Array <Element>), (AutoreleasingUnsafeMutablePointer<Pointee>, AutoreleasingUnsafeMutablePointer<Pointee>), (ClosedRangeIndex<Bound>, ClosedRange Index<Bound>), (LazyDropWhileIndex<Base>, LazyDropWhileIndex<Base>), (EmptyCollection<Element>, EmptyCollection<Element>), (FlattenCollecti onIndex<BaseElements>, FlattenCollectionIndex<BaseElements>), (FlattenBidirectionalCollectionIndex<BaseElements>, FlattenBidirectionalColle ctionIndex<BaseElements>), (Set<Element>, Set<Element>), (Dictionary<Key, Value>.Keys, Dictionary<Key, Value>.Keys), ([Key : Value], [Key : Value]), (Set<Element>.Index, Set<Element>.Index), (Dictionary<Key, Value>.Index, Dictionary<Key, Value>.Index), (ManagedBufferPointer<Hea der, Element>, ManagedBufferPointer<Header, Element>), (Wrapped?, Wrapped?), (Wrapped?, _OptionalNilComparisonType), (_OptionalNilCompariso nType, Wrapped?), (LazyPrefixWhileIndex<Base>, LazyPrefixWhileIndex<Base>), (Range<Bound>, Range<Bound>), (CountableRange<Bound>, Countable Range<Bound>), (ClosedRange<Bound>, ClosedRange<Bound>), (CountableClosedRange<Bound>, CountableClosedRange<Bound>), (ReversedIndex<Base>, ReversedIndex<Base>), (_UIntBuffer<Storage, Element>.Index, _UIntBuffer<Storage, Element>.Index), (UnsafeMutablePointer<Pointee>, UnsafeMut ablePointer<Pointee>), (UnsafePointer<Pointee>, UnsafePointer<Pointee>), (_ValidUTF8Buffer<Storage>.Index, _ValidUTF8Buffer<Storage>.Index) , (Self, Other), (Self, R), (Measurement<LeftHandSideType>, Measurement<RightHandSideType>)"17 -
I didn't think I'd be able to contribute but today proved me wrong.
I'm a front end dev, and I'm the marketing department's go-to in IT (read: I'm their bitch :[ ) The digital marketing guy pinged me today saying he wanted to see if there's a way he could avoid having the president ask him about a task he supposedly did months ago: implement a glossary on our website and index its pages.
Turns out he hasn't done that task at all because he disagreed with the president's decision to even have a glossary.
Fast forward to now, and the president is asking how the glossary is doing. Cue my coworker sending me messages asking how he can avoid having to index the pages now, as well as not get in trouble for not having done it but saying he did.
So in summary: he did not do a job the president told him to do, he lied and said that he had done it, he is avoiding talking to the president about it, he is trying to get me to help him get out of it and cover his tracks, AND he just admitted it in company channels of communication.
Next time, just index the glossary, dude. We all get handed work tasks we don't want to do.4 -
I FINALLY comprehend list comprehensions.
I can write an unlimited amount of nested loops on a single line and make other less experienced people hate me for fun and profit.
Also learned about map() #I hate it#, zip(which is awesome), and the utility of lambdas (they're okay).
Enumerate is pretty nifty too, only thing I lose is setting the initial value of the iterator index.15 -
dates are just an index of time
practicing is just offsetting your initial, natural ability in a positive direction
do you guys ever just think of things in an abstract sense?
what are other examples?16 -
Am I the only one who gets extremely nervous the night before an interview as that technical test can encompass the entire academic field of CS. I'm just worried I'll forget the difference between a clustered and non-clustered index or fail to convey the difference between TDD and BDD.
I'm ten years in to my career now, so I 'should' know my stuff. I've produced the tests my self, hired other devs, but I still feel the nerves.8 -
VB.net on the rise?? what the horse fuck is going on here?? ref: http://www.tiobe.com/tiobe-index/19
-
Just had to write an old-skool for loop. Index...termination condition...whole works. I feel dirty.
Bit embarrassing as someone saw me writing it, thought I was a hacker and informed the authorities. Spent the last hour being waterboarded.
We had a big laugh about it when they realized I was just fixing bugs in a legacy app.
National Security. Hilarious.10 -
Currently rebuilding a web store backend originally developed in 5.2 and by an Indian guy who loved his spaghetti and his knowledge of version control is to do things like 'index.php, index1.php, index-old.php'. Even on the DB he does this... God damn9
-
Probably the smallest, most inconsequential rant I'll write here, but - is it that hard for websites with a main search input or login field on their landing page to put its tab index to 1?
I mean, my mouse is all the way over *there* ~ -
Reading about Lua, see this:
"Lua arrays are 1-based: the first index is 1 rather than 0 as it is for many other programming languages (though an explicit index of 0 is allowed)."
*close tab*2 -
As a Backend guy doing CSS. (Honestly don't know what i'm doing)
position: absolute;
z-index: -999999999999; /* better fucking work*/
margin-left: -1200;
background: red;
asdfghjkl
wait? what?3 -
Using z-index 99999999999.
Are you fucking serious... please go somewhere far far away from me and cut your hands off so I don't have to deal with this shit.3 -
Idea to overhaul the CSS !important system...
Allow it to accept a numerical value much like z-index.
But the max !important level is the current year so that the more current your code, the more important it is.
Works based off the last edited date of your files to prevent cheaters.7 -
If you're having CSS problems, I feel bad for you son,
I got 99 problems that I fixed with 'z-index: 100;' -
This night I dreamt that I could build indexes (yeah, boo me on the plural) for relalife things..trees, buildings, birds.. Everything gets an index, Oprah style!!!! And once last month I also dreamt I could debug real life things.. Look at the person and see what's wrong with them.. All their stats, bugs, everythiiiiing!! So disappointend when I woke up :(7
-
ripgrep is AMAZING!
It's a CLI tool to search your code quickly, and here's the kicker: it uses your . gitignore to only index your source.
It is fast, powerful, and highly flexible and I'm MARRYING IT
`brew install ripgrep`
`rg 'your new bicycle' -g '!*.yml' `4 -
It's looks like this weeks "Weekly Group Rant" is trolling all the developers who have side projects that never finished.
1. CMS like WordPress
2. MVC framework like Laravel
3. Android App like Tinder
and... list goes on.
#1, #2 and few others are still stuck on index page.2 -
Im getting annoyed by the new layout of google. Hovering the sidebar will make a scrollbar appear but the main part of the site's scrollbar will disapear. This results in most content moving from their original place. Let's make a Stlyish script to fix this problem I thought. Guess what now somethings stay where they should be, but the things that were first on the right place have moved. Also this will make the header shorter. I'm getting more and more amazed how shitty some frontend devs are at google.
To fix one bug they, instead of solving the bug, tried to counter the result of the bug.
I do like the z-index of the sidemenu though (it's 2005, the year youtube was created)12 -
Defining importance as a Web Developer.
Firefox === Iceweasel !important;
z-index: 99999999999999999; -
One time I was building a custom modal for some crappy WordPress template and I was having trouble with the header rendering above my backdrop, after digging into the CSS I realized the headers z-index was literally set to 9001.1
-
My boss: Can you write something to append the product names with their descriptions?
Sure. Sure you want that?
Yes. Asap please.
Okay, I'll finish it this today.
*Done
Finished it, want me to publish this to production?
Yeah.
(One week later)
Did you put those name changes online?
Yes, why.
Oh damn, your co-worker, D. Trump, has changed a lot of the names so they index better on Google. You should check those kind of things before changing it online.
Right..
Concerns a few thousand products. Long story hah
Tldr; updated many product names overriding many hours of manual labour.7 -
CSS + Noob + Import html
Hey guys
Need some help here.
Is it possible to include an HTML file inside another HTML file without an iframe? I wanted to create the structure of the page in one file and include it inside another HTML (for example, have one index that dynamically includes an HTML file in a section, called by the menu OR having the menu, top and footer in one or two files and include them in all the other pages...)42 -
I just found something cool on accident.
Assuming you start the fibonacci sequence on 2, you can find any of the fibonacci numbers for a given index with a simple trick:
Let Phi = 1.618
Let your index n = n+1
Floor(phi**(n+1+0.328))+1 = the fibonacci number at index n in the sequence.
This probably breaks down past some point but its nifty.21 -
Friend getting 'index out of range' error so I wonder over and have a look 🤔
Array_variable[-1]
🙈🙉😩
No words were needed!2 -
Arguing with a guy in a PR that substring(0,1) (first index inclusive, last exclusive) is equal to charAt(0), whereas he seems to think it's charAt(1).
My patience is wearing thin, but I now feel the need to check I'm not the moron here - someone please confirm if I'm the idiot here or not?20 -
Does anyone just feel tired, in general? Like the boss is (usually) alright. I like the work and I am good at it. Maybe I'm not feeling challenged enough? Honestly, I'm not sure. In the last retro, I was an 8.5/10 on the happiness index, now I'm a 4...wtf4
-
I just wasted 2 hours trying to figure out why the properties of a destructured object returned undefined, even though everything was fine in JSON format. Tried to request data on the frontend from my server with a database attached. Tried accessing each object of my array separately, it worked. In a loop: dataArray[index].propertyX ... undefined??
Turns out I used the wrong property names to access the info inside each object.
🤦1 -
The more I work with performance, the less I like generated queries (incl. ORM-driven generators).
Like this other team came to me complaining that some query takes >3minutes to execute (an OLTP qry) and the HTTP timeout is 60 seconds, so.... there's a problem.
Sure, a simple explain analyze suggests that some UIDPK index is queried repeatedly for ~1M times (the qry plan was generated for 300k expected invocations), each Index Scan lasts for 0.15ms. So there you go.. Ofc I'd really like to see more decimal zeroes, rather than just 0.15, but still..
Rewriting the query with a CTE cut down the execution time to pathetic 0.04sec (40ms) w/o any loops in the plan.
I suggest that change to the team and I am responded a big fat NO - they cannot make any query changes since they don't have any control on their queries
....
*sigh*
....
*sigh*
but down to 0.04sec from 3+ minutes....
*sigh*
alright, let's try to VACUUM ANALYZE, although I doubt this will be of any help. IDK what I'll do if that doesn't change the execution plan :/ Prolly suggest finding a DBA (which they won't, as the client has no € for a DBA).
All this because developers, the very people sho should have COMPLETE control over the product's code, have no control over the SQLs.
This sucks!27 -
Am I the only one who enjoys learning low languages like C/C++ and absolutely hate Java (seriously FUCK Java so much I hate using it)
Working with pointers and just having the compiler completely explode in your face because you forgot a semicolon or an index out of bounds maybe a bracket just disappeared and you are frustrated but then you fix it and voila it works like magic.
Maybe it's just a thing of mine because C++ was the first programming language I learned and I miss this feeling of hopelessness (I think I might have done BDSM fetishes) and it makes me feel nostalgic.
When I was first learning them all I thought about was how cool this stuff is.19 -
I came up with a horrendous Java joke while I was away from devRant.
What happens when someone cuts off someone's index finger?
java.lang.NullPointerException: null4 -
"IM IN YR loop UPPIN YR index"
That's it, I'm using LOLCODE wherever possible 😅
https://github.com/justinmeza/...3 -
I need to delay execution of code in a for loop, how do I do that?
PHP: Sleep(3000)
Javascript:
const waitFor = (ms) => new Promise(r => setTimeout(r, ms))
const asyncForEach = (array, callback) => {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array)
}
}
const start = async () => {
await asyncForEach([1, 2, 3], async (num) => {
await waitFor(50)
console.log(num)
})
console.log('Done')
}
start()
Fuck you Javascript17 -
We bitch about JavaScript a lot, but I have never encountered a language with better out of bounds index handling for its array methods. It does make some projects considerably easier!7
-
Sometimes I worry about the impact AI will have on software development jobs in a future.
... then I see things like this and remember why humans don't deserve nice things.3 -
I still remember when I was 8 years old and used to use "position:absolute"everywhere and use top and z-index to hardcodedly place my elements in my old web projects. I used a lot of <br> and padding + margin were not familiar words to me.
Somehow these projects were responsive, too. Strange times.
Nowadays I avoid "position:absolute", z-index and <br>s like the plague lol5 -
Working on modifying a legacy web project and just about every single element is `position: absolute` with crazy z-index juggling and hard-coded pixel sizes and positions everywhere 😭
To make it even worse, a bunch of the javascript will also change elements sizes and positions so it takes forever to track down why an element is where it is1 -
Looks like whole world is not giving a fuck about work, recently.
Source GII - global innovation index.7 -
I Google
I stack overflow
I am an index that references
The internet memory
The modern day code-er mantra -
!rant
I’ve just looked into Rust a bit deeper and was absolutely stunned by how many things it has in common with Swift. The Syntax, the features, the concepts, the "philosophy".
Previously I thought that Kotlin is what comes closest to Swift.
Anyway, Rust seems like a beautiful language and it’s no wonder that it is one of the most loved languages out there!
The compile time index out of bounds errors blew my mind!2 -
Don’t use an array with index to get a value without checking the length. Don’t use an object without checking for null.
-
My favorate bookmarklet (ES6 only):
javascript:(()=>{var b,c,a=document,f="onreadystatechange",h="https://rawgithub.com/smore-inc/...=(p,q)=>{p.readyState?p[f]=()=>{"loaded"!=p.readyState&&"complete"!=p.readyState||(p[f]=null,q&&q())}:p.onload=function(){q&&q()}},k=()=>{clippy.load("Clippy",p=>{$(".clippy").css("position","fixed"),$(".clippy").css("z-index",1e3),p.show(),p.moveTo(100,100)})},m=()=>{(c=a.createElement("script")).src=h+"clippy.js",a.body.appendChild(c);var p=a.createElement("link");p.rel="stylesheet",p.type="text/css",p.media="all",p.href=h+"clippy.css",a.getElementsByTagName("head")[0].appendChild(p)};"undefined"==typeof jQuery?(b=a.createElement("script"),b.src="https://ajax.googleapis.com/ajax/...,j(b,()=>{m(),j(c,k)})):"undefined"==typeof clippy?(m(),j(c,k)):k()})();14 -
I was copying data from a failing zfs drive with rsync and I noticed that it spent a long time on the file ~/.local/share/Baloo/index
du -h index showed a 500ish MB file which didn't seem large enough to take this long.
I recalled that du shows disk usage, not file size and since I was using zfs compression they could be quite different.
so I added -A for apparent size:
du -hA index and it comes back with 1.7E
The file was 1.7 exabytes...6 -
For those who speak some Japanese and want to expand their skill set a bit, I found a great introduction to PHP in Japanese a few months back, and have been reading through it primarily with the purpose of learning programming vocabulary and figuring out how to express concepts properly from a grammatical standpoint.
If anyone's interested, here's the link: https://www.javadrive.jp/php/
Scroll down the page for an index of topics.6 -
!rant Bought a fertility hormone test and so I have to wake up early tomorrow to lancet two (or more!) fingers and bleed on some index cards (not literally index cards, probably) before mailing them to a lab. Fun times, fun times. 😅5
-
After 24 hours waiting for Xcode 9 to finish download, I run it on an existing project and got greeted with this:
Indexing Text
For fucknsake you piece of shit! Because indexing project isn't enough now Xcode index text! What the fuck are Apple employees smoking 😔4 -
How come your fucking pseudo code is far more complex than python code? You're a fucking university teacher FFS, ALSO TELL ME WHY THE FUCK YOU START YOUR INDEX LIST BY 1.1
-
Today on "fuck Firefox": elements with display: inline and position: relative completely mess up z-index and nested fixed / absolute positioned elements. It's a known bug, it has open issues on bugzilla since 2005, but still no fix. IE 8 can get it right, but not Firefox...9
-
was pretty excited to see the annular solar eclipse, pretty cloudy today, wish I could adjust the sun's z-index 😐
-
I just gave a simple API which fetches recent searches by pinging an index on elasticsearch to the UI developer.
She had just one job. And ended up calling the server every time it loads on every screen thereby reaching max limit of calls per second and giving 429.
QA are not even required to break your code. UI developers are more than enough :) -
Today, making a list out loud while in a conversation with a co-worker.
Me:
"thing one" *puts out hand*,
"thing two" *raises thumb*,
"thing three" *raises index finger*,
"thing four" *raises middle finger*
Co-worker: "That's 3 fingers, you said 4 things.."
Me: "I guess I mentally counted in base 0.."3 -
When you cache index a faster query but your co-worker from other part of the world clears it.... It's been six times now dude2
-
We have a bunch of legacy applications that runs on Windows only. I'm pretty much the only dev here who doesn't use a Windows machine.
In order to run those applications, I need use remote desktop to a Windows VM.
I use a Mac. And I use a lot of keyboard shortcuts. Case in point, CMD + L to go to the address bar in the browser.
This happens every time when I need to access those applications.
me: *remote desktop to the VM
me: "oh I need to get to the index/landing page"
me: *CMD + L
VM: "I'm locked now"8 -
When you're doing bounds checking on an array and type "i" instead of "j", so it refers to completely the wrong index >>>>>7
-
I (junior dev) hate it when my boss tells me to do things that totally don't make sense...
I'm managing an internal site which requires a login to access. Why the hell should I change every damn article in the cms, so robots meta tag is set to no index. It's behind a fucking login and Google won't be able to index it! (except the login of course)
...
I did it anyway.2 -
"=$B1*INDEX(A:A,ROW())"
See this absolute bullshit right here?
This fucking cunt of a problem designed by some dippity-do finger-painting fucking jackass at google doesn't work why?
Because for some *god damn reason* they decided it would be a good idea to setup it up in a way that when you use absolute cell references in a formula, you can't use functions in the formula too. No the other side has to be a literal or cell reference apparently.
Motherfuckers.3 -
Should I be ashamed?
I hardly ever use "i" as a counter in for loops
I most likely use "k" and "j"; "i" stands for "index"23 -
I had expected to see people posting about the Valve Index so I waited a bit because I'm lazy.
Since nobody has posted it, here it is.
A few days ago Valve started the pre-order process for their new VR set. I bought one within 5 minutes of going live. They sold out in 8 minutes on the US store and within 25 minutes in Europe.
Who else has ordered/is gonna order it? Why (not)?7 -
So I was in a great mood and decided 'fuck it let's try making something, have a couple beers, make some taco's and break out the old coder lxmcf'...
Started cutting lettuce and then BAM! Cut a large chunk of my left index finger off...
So now I am unable to type properly because my finger is making me angry with pain, guess that's what I get for wanting to get back into programming8 -
Just created a CLUSTERED INDEX -- knowingly and intentionally -- for the first time. I feel like a frickin' sorcerer.
-
I love python, but a short way to enforce interfaces on arguments would be great. I mean, this is the third function where type checking is longer than the actual body.1
-
You made a very important device used in pharmaceutical labs which stores important data, but for some fucking reason you decided to write the communication protocol so poorly that I want to cry.
You can't fucking have unique IDs for important records, but still asks me for the "INDEX" (not unique ID, fucking INDEX) to delete a particular one. YOU HAVE IT IN THE MEMORY, WHY DON'T USE IT?!
How the fuck you have made such a stupid decision… it's a device that communicates using USB so theoretically I could unplug it for a moment, remove records, add them and plug it in again and then delete a wrong one.
I can't fucking check if it's still the correct one and the user isn't an asshole every 2 seconds because this dumb device takes about 3 for each request made.
WHY?
Why I, developing a third party system, have to be responsible for these dumb vulnerabilities you've created? -
WOW Xcode is such a trash fucking application, I am so pissed at how much I have to fight this damn piece of shit program to get my work done
The time it takes to index my code is disgustingly long, I sit and sit and wait for it to FINALLY recognize I've added a new variable to the header file before it can begin to suggest autocompletions, but wait??? Why is it telling me there's errors about another variable? On a line of code that doesn't even fucking mention that variable??? BETTER WAIT IT OUT FOR IT TO INDEX SOME MORE, NO XCODE MY CODE ISN'T ERRONEOUS, YOU ARE YOU CRAP SHOOT!!
AND WHY WON'T YOU LET ME SPLIT VIEW YOU WITH ANOTHER APP??2 -
Made my first contribution to the Python package index. Contributing to open source has always been fun. DevRants, please check my module that I have contributed. Here is the link to PyPi - https://pypi.org/project/... and GitHub - https://github.com/browserium/...
Please post your feedback and comments so that I can improve my module and have a workaround across all the issues.1 -
Swear work is where you I go to fix other peoples poor design decisions and clean up the bullshit that comes out of said decisions.
CANT!
BE!
FUCKED!
How you have so many years experience and still design in way that ensures that maintenance /improvements/touching in the future is a huuugggeee clusterfuck.
Hey, I got an idea, lets make this whole data warehouse without a single index or primary key cos you know, that's the Kimball Method.2 -
Swift SUCKS
Why?
Because of its absolutely useless complexity...
a total simple thing: i have a string and want to concat a integer with it, so:
var x = stringVar + intVar; right? NO
its var x = stringVar + String(intVar);
or getting the index of a element in a array?
var index = array.indexOf(element); thats logic, right??? Not for swift, gotta go with: var index = array.index(of: element); WTF??!!
And all the other shit: nil instead of null, int++? Nope.
And there are SO MANY MORE things, where u just think, Apple really though different........than all normal coding languages.......
I´ll honestly rather learn C and recode Ios or have a look at objective-c...14 -
and this is why you dont let a first timer build your database....
"has 34 column names in index key list. The maximum limit for index or statistics key column list is 16"4 -
I just stared as a trainee at a webdev firm.. I'm starting a company with my friends parallel to this. I never thought my life would be waking up and doing 13 hours of WordPress.. Today a customer asked me to speed up her website, it had 30 plugins all of which she uses..moving the cache erased the plugin-generated index page, it was nowhere to be found even after pulling backup..
Now I've been home for four hours.. trying to work around a "responsive theme" a customer picked.. It should be called Worsedepress6 -
Reading OpenSource lib that write in TypeScript is a nightmare
WTF:
export function concatMap<T, I, R>(
project: (value: T, index: number) => ObservableInput<I>,
resultSelector?: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R
): OperatorFunction<T, I|R> {
return mergeMap(project, resultSelector, 1);
}
That is just fucking definition, no execution code inside1 -
Dear Kubuntu 20.04
You're not a programming language but I felt that you fit here in this wkRant so people can see how shitty you became.
It's about 6:27am CET, and you wasted my night, you used to be as simple as sudo apt-get install, now you're mostly PPA first or worse, make. You killed make now we use cmake. We are now looking for debs, which is a pain since you end up in an index site without download here. And the debs now don't work. Missing dependencies. You killed core libraries saying they are now incompatible or obsolete.
All I want is my god damn cli visualiser and osdlyrics back!!9 -
Director of Software Engineering doesn’t index any data including million plus row tales, and didn’t know what they were when asked about them.4
-
Heres some research into a new LLM architecture I recently built and have had actual success with.
The idea is simple, you do the standard thing of generating random vectors for your dictionary of tokens, we'll call these numbers your 'weights'. Then, for whatever sentence you want to use as input, you generate a context embedding by looking up those tokens, and putting them into a list.
Next, you do the same for the output you want to map to, lets call it the decoder embedding.
You then loop, and generate a 'noise embedding', for each vector or individual token in the context embedding, you then subtract that token's noise value from that token's embedding value or specific weight.
You find the weight index in the weight dictionary (one entry per word or token in your token dictionary) thats closest to this embedding. You use a version of cuckoo hashing where similar values are stored near each other, and the canonical weight values are actually the key of each key:value pair in your token dictionary. When doing this you align all random numbered keys in the dictionary (a uniform sample from 0 to 1), and look at hamming distance between the context embedding+noise embedding (called the encoder embedding) versus the canonical keys, with each digit from left to right being penalized by some factor f (because numbers further left are larger magnitudes), and then penalize or reward based on the numeric closeness of any given individual digit of the encoder embedding at the same index of any given weight i.
You then substitute the canonical weight in place of this encoder embedding, look up that weights index in my earliest version, and then use that index to lookup the word|token in the token dictionary and compare it to the word at the current index of the training output to match against.
Of course by switching to the hash version the lookup is significantly faster, but I digress.
That introduces a problem.
If each input token matches one output token how do we get variable length outputs, how do we do n-to-m mappings of input and output?
One of the things I explored was using pseudo-markovian processes, where theres one node, A, with two links to itself, B, and C.
B is a transition matrix, and A holds its own state. At any given timestep, A may use either the default transition matrix (training data encoder embeddings) with B, or it may generate new ones, using C and a context window of A's prior states.
C can be used to modify A, or it can be used to as a noise embedding to modify B.
A can take on the state of both A and C or A and B. In fact we do both, and measure which is closest to the correct output during training.
What this *doesn't* do is give us variable length encodings or decodings.
So I thought a while and said, if we're using noise embeddings, why can't we use multiple?
And if we're doing multiple, what if we used a middle layer, lets call it the 'key', and took its mean
over *many* training examples, and used it to map from the variance of an input (query) to the variance and mean of
a training or inference output (value).
But how does that tell us when to stop or continue generating tokens for the output?
Posted on pastebin if you want to read the whole thing (DR wouldn't post for some reason).
In any case I wasn't sure if I was dreaming or if I was off in left field, so I went and built the damn thing, the autoencoder part, wasn't even sure I could, but I did, and it just works. I'm still scratching my head.
https://pastebin.com/xAHRhmfH33 -
Fucking Google firebase database has no equivalent of 'SELECT * FROM shitheads LIMIT 10, 10'.
Better download those first 20 elements!
Descending order? haha. Fuck you.
Add your own custom index for that shit!3 -
Teaching a colleague to use INDEX / MATCH in Excel
Me: Type in =MATCH() and select the reference cell, the column its in, and put 0 for the last value.
Them: OK... Done
Me: Now type in =INDEX() and select the column you want to match with, then put in the value you got from MATCH()
Them: OK... Done
Me: Now combine the two formulas
Them: How?
Me:...1 -
```
public someMethod(index: string): Promise<void> {
return Promise.resolve(someAsyncFunction().then(() => {
return;
})
.catch((error) => {
this.logger.error(error);
throw error;
});
```
Somebdoy doesn't know their async / await syntax but they wanted aboard the promise-hype train. There is an entire class in that style.1 -
Me : So cool ! My new graphQL APIs are working so good !
Also me : ‘order by <text field> take 50 skip 10000’
Me : Hmmmm.. 2.3 SEDCONDS ?! WTF. Let’s add an index !
SQL : Sorry bro, can’t add index on nvrachar(max).
Me: OK. Here you go, you are nvrachar(128) now. Add my index !
SQL : Ok
GraphQl :<same query > Here : 90 milliseconds
Me : ‘order by <text field> desc take 50 skip 10000’
GraphQL : Sorry bro : 3 seconds. (Yes, slower than without any index)
Me : Do I fu7cking need to manually add ASC and DESC indexes ? WTF IS GOING ON !
I should’ve learnt a bit more about databases. ☹. And now I don’t have time to refactor a prod database as “needed” .
/me needs to buy DB audit. Company is still a bit small to have a DBA full time.6 -
Damn @&$#%£¥ hibernate. Why is ur API so $£¥%#*^ inconsistent and buggy????
@Index on mappedsupertype any? @index causing duplicate tables on hsqldb?? REALLY????
Why does it work on mysql?
Maxresults and fetch joins cause ALL rows to be fetched, instead of properly generating a „limited subselect“? WHYYYYYY, JUST WHY???? -
That feeling when you open link that's supposed to lead to the index of documentation and you find this...
The rest was.. unfinished..
#fml -
Please stop, stop now...
(BTW, assignment statement was on one line, I added breaks just so I could fit it into a screenshot)
If the text is too blurry:
int index;
string fileNameWithoutExt;
additionalData.MailImportConfigCode = (fileNameWithoutExt = schema.Remove(schema.LastIndexOf('.'))).Substring((index = fileNameWithoutExt.LastIndexOf('.') + 1), fileNameWithoutExt.Length - index);
}2 -
When you open problematic code and someone actually queried all the items from db inside for loop... And took only one item on specific index... Instead of iterating over items from query result... 😓😓5
-
Me: I have very perfect reason why I did not come to work to day .
Client: Please state your reason .
Me: its silly I don't wanna talk about it.
Client: please do
Me: my index fingers are hurting
Client: why
Me: what do you mean why I was tying to git push heroku master
But every time some json dependency failed -
It seems google index this link: https://devrant.com/search/...
for that query:
The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. -
Ok who is the Cordova dev that thought it would be funny to make the indices from the confirmation box start at 1 and not mention it in the docs?!
-
How difficult would it be to change the Android app to use a left to right swipe to go back to the rant index, rather than/in addition to the left arrow or X?2
-
The plural of schema is schemata, and the plural of index is indices.
Words with irregular plurals are interesting, stop trying to force them to be like normal words.17 -
tl;dr never heard about rubber duck debugging before devrant
i didnt worked with Yii fw in the past but we bouth a site written in Yii and i wanted to add a form but could not pass the model to the view so i went for a smoke with my roommate to think about it
"i have the view, i have the model, the action but dont know how to pass the model variable because its an existing view..."
"...it should be passed to the render function in the existing index action but thats written somewhere else, so if i could pass it there..."
"...i can write the action there and then i should pass the variable to the render function in the index action and goddamit, so thats how you do it, thanks mate!"
he stared at me like wtf? o.O
room mate debugging ftw!1 -
Argghhhhhh!
Non-unique Multi-Index killing me...
Even when there is no duplicates found in the data frame.
What the hell am I missing.. -
You could do:
let categorysString = '';
categories.map((item, index) => {
if ( index === 0 ) {
categorysString = categorysString + `${item.categoryName}`;
} else {
categorysString = categorysString + `, ${item.categoryName}`;
}
});
Or you could just do:
return categories.map(category => category.categoryName).join(", ")
🙄
Previous company must have been payed per line...3 -
How much of the web do you think is still handcoded and what generated/wysiwyg-ed?
(Of 2018? What if you leave out every subpage/only domain.tld/index)8 -
Today, in "Typos that wasted hours of debugging"...
PHP...
>:(
PHP is such a bitch when it comes to unset variables, why didn't it trigger a warning or something when I tried to $typo[$index]?? I may be missing something and my head starts to ache.
Fixed tho', lesson learned.4 -
I was watching this fantastic talk on coding through refactoring:
https://m.youtube.com/watch/...
Highly recommended....
And it got me all enthusiastic about coding again and then I realised, at my last work place, the "we value code quality" corporate hellhole you'd be criticised for taking too long by management and for changing too much code by coworkers.
And a month later, you'd come back to the code and some other coworker would have jammed in a bunch of extra if statements and absolutely fucked your nice structure....1 -
why cant google just index my fucking website?
its been two weeks and the last one I did took so little time
if you go to https://google.com/search/... it shows up, but not the most common query for the site https://google.com/search/...
smh🤦♂️3 -
From yesterday I started using the proper typing way (Qwerty) instead of using only two index fingers .
Guess what My WPM dropped from 47 to 8(average).
I'm doing it Just to get better at vim and increase my programming efficiency.
I feel a long way to go to fix my bad typing habits.10 -
I don't like when client decide which tech use in the project. I got some weird tech request like:
1. Move existing database from postgresql to Hadoop because hadoop is Big Data (is kinda move from amazon rds to amazon s3 just why? have you index, cluster your postgresql table?)
2. Move from mysql to postgresql because mysql cause deadlock (maybe their previous developer just fucking moron)
In this situation we just explain why we don't use that and propose alternative solution. If they insist with their solution either ignore it or decide not continuing the project.5 -
To generate a true random number you must call the random function a random amount of times, store those results in an array, then pick a random array index5
-
There are two types of people in this world, those that understand that arrays start at 0 and
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at NewClass2.main(NewClass2.java:7)2 -
how to describe the feeling when you started using sql and you had to get the first element from a table via jdbc...
you, obviously, think "oh, the first index is 0, every languages start at 0, so let's take the content at 0!!!" but the ide returns you "0 < 1"
so you don't understand, you stare the code for 20 mins, you start crying, and then you realize sql starts counting from 1 because it pretends to be cool BUT IT DOESN'T
I hate you, sql.5 -
Math question time!
Okay so I had this idea and I'm looking for anyone who has a better grasp of math than me.
What if instead of searching for prime factors we searched for a number above p?
One with a certain special property. BEAR WITH ME. I know I make these posts a lot and I'm a bit of a shitposter, but I'm being genuine here.
Take this cherry picked number, 697 for example.
It's factors are 17, and 41. It's trivial but just for demonstration.
If we represented it's factors as a bit string, where each bit represents the index that factor occurs at in a list of primes, it looks like this
1000001000000
When converted back to an integer that number becomes 4160, which we will call f.
And if we do 4160/(2**n) until the result returns
a fractional component, then N in this case will be 7.
And 7 is the index of our lowest factor 17 (lets call it A, and our highest factor we'll call B) in our primes list.
So the problem is changed from finding a factorization of p, to finding an algorithm that allows you to convert p into f. Once you have f it's a matter of converting it to binary, looking up the indexes of all bits set to 1, and finding the values of those indexes in the list of primes.
I'm working on doing that and if anyone has any insights I'm all ears.9 -
There is no such thing as a "Random Error".
Unless you are using rand() to select a random index from an array. And you forget to add - 1 to the generated index.
Now that is one hell of a random error! -
There is a element in mappView that lets you display a specific image from a list based on a index. It has the parameters selectedImageIndex and selectedIndex. One is used to set the other to read. Its not like that you need RW separation. Its done with variable binding. So why the FUCK is it there????2
-
Had to do the FizzBuzz test in PHP. Proceeded to creat a range(1, 100) before the for loop instead of using the loops own index #. Worst part is I realized what I had done in the parking lot after I left. They asked me multiple times how I could optimize the code too lol.
-
When you work on something for few hours and then write a script to recursively replace strings in your project but forget to take into account the git index and end up corrupting it 🤦🏻♂️🤦🏻♂️
I know I should have pushed commits in between. Lesson learnt -
My CSS-only hamburger menu.
It's cool and all, just a few lines of code, but some days ago I tried to do a 2 sides hamburger menu.
Based on that I just copied it and changed every left for right. Worked. Like. A. Charm. I had to apply some z-index stuff of course but nothing out of ordinary.
I'm so cool. I'll upload it to GitHub ASAP, but it's not a priority rn. -
Goodjob Self, you fucked up your Git local repo.
```
[ git checkout master || git stash ]
fatal: git-write-tree: error building trees
Cannot save the current index state
```2 -
What is a normal write speed (docs/second) for mongo db?
Can't find a benchmark online and well I'm trying to prove my point to my boss that our speeds are insanely slow due to index bloat,..13 -
Hello, can someone help me with this one ? I guess that the fucking SO elitist community would have beaten me to death if I asked this question.
I'm trying to create a relational table between a Tutorial object and a User object (to know which tutorial the user has access to) using Sequelize, and I figure out that I have two PRIMARY keys in my table. How is it possible ? UserID is also marked as Index.
The both keys are not Unique in themselves but their combinations are unique.4 -
Microsoft, why did you put a index base modifier command into VBA if 2/3 of your built in libraries ignore it?
-
Finding this in the documentation - //skipping index that are multiples of 10 (multiples of 10 create problems as the input IDs) if ( $input_id % 10 == 0 ) { $input_id++; }
-
When everything passed to the front end is in the form of a magic array... all values are grabbed using an arbitrary index...
-
the code from a school colleague. So written that you must load the index page and are redirected to a second. if you try to load the second page you get errors. Many errors.
-
Am an amateur programmer. Started with GitHub today, even though my core head(boss) believes I'm well experienced with it. To begin with, I uploaded the previous project via the browser interface. No big deal. Then to start making pushes, I made a minor variation in the index page of the project and tried to push. Took me six commits/pushes(yet to figure out what are they) to get it up in the remote version. Just realised that all the commits are recorded and anyone can view them.
Idk what my boss will be thinking about hiring me.1 -
I feel a bit confused rigt now.
Did i misunderstand something with this random little excercise?
" Write a Java program to find the index of a value in a sorted array. If the value does not find return the index where it would be if it were inserted in order. Example:
[1, 2, 4, 5, 6] 5(target) -> 3(index)
[1, 2, 4, 5, 6] 0(target) -> 0(index)
[1, 2, 4, 5, 6] 7(target) -> 5(index) "
Here is what i did lol:
https://gist.github.com/laim2003/...
And here is the official solution:
https://gist.github.com/laim2003/...
Their solution seems a bit unnecessary complicated lol or am i wrong1 -
So a couple of months ago I had some stability issues which seems to have caused Baloo go crazy and create an 1.7 exabyte index file. It was apparently mainly empty as zfs compressed it down to 535MB
Today I spent some time trying to reproduce the "issue" and turns out that wasn't that hard.
So this little program running on FreeBSD with a compressed (lz4) zfs dataset creates an 1.9 Exabyte large file, nicely compressed down to 45KB :)
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/limits.h>
int main(int argc, char** argv) {
int fd = open("bigfile.lge", O_RDWR|O_CREAT, 0644);
for (int i = 0 ; i < 1000000000; i++) {
lseek(fd, INT_MAX, SEEK_CUR);
}
write(fd, " ",1);
close(fd);
}3 -
Does it count as a learning experience if I have still not yet fully learned it? Then it's estimating tasks.
Fix this bug where the modal is rendered underneath the message-count-badge on your profile? Heh should be easy, 10 mins to set a higher z-index.
Final cost: two weeks, where I needed two status meetings and drawing on the whiteboard to explain why this happens and why it needs a major restructuring.1 -
And now I've run into a whole another issue which is really fucking strange.
Has it ever occured that a Object in java looses all it's values after being put into an array of same type?
My problem:
[code...]
Mat[] matArray = new Mat[totalFramesOfVideo];
videoCapture.open();
Mat currentFrame = new Mat();
int frameCounter = 0;
while(videoCapture.read()) {
currentFrame = (last read frame as a Mat)
matArray[frameCounter] = currentFrame;
frameCounter++;
}
then, after filling the array and accessing elements, they lose all their object values.
Eg. Before currentFrame's dimensions were 1080*1920, but matArray[index] dimensions are suddenly 0*0.6 -
Hello wonderful people out there, I need some career advice and would really appreciate your help in deciding. I am sure you have perspectives and opinions that may not even have crossed my mind.
I am a Full Stack Dev with 9 years of experience. I got two overseas opportunities, one in Bucharest, Romania and the other one in Mississauga, Canada.
Now according to my research:
+ives in Romania:
> Role is good
> Low cost of living
> Money is good and company also provides 2 bed accommodation
> Access to Europe
> Is approx 8 hours far away from my country of origin
-ives in Romania (just as per my internet research when compared to Canada)
> Healthcare is not the great
> Scores low on standard of life and quality index
> Not sure I can think of settling down there
+ives in Canada
> No Language barriers
> Ample amount of opportunities in the long run
> Can strongly think of settling down there
> Scores really high in standard of life and quality index
> Strong healthcare and education system
-ives in Canada
> Living expenses are fuckin high
> Money initially is not that great and won't be able to save enough for my future goals
> Is approx 28 Hours far from my country of origin
Which one would you choose and if you can please mention why?11 -
Google's "Mobile Friendly Test Tool" is shit.
It does its automated test's during it's index and points out that there are various issues with the page and IT IS NOT mobile friendly.
So I go and test the page in the Mobile test tool to see what other error's it's reporting and it comes back and says "This page IS mobile friendly".
Like WTF Google, make up your fucking goddamn mind and stop pissing me about.rant google can go fuck itself google is a bitch search console fuck google overlord mobile development google1 -
According to project manager :
You will just write an 'if' and two 'for' condition in the code. That's it. 😉
According to developer :
Should I code that generically. 🙄
According to software architect :
Change those variable names. And also that code was written huge unexpectedly, you must move this another service.🤔
According to DB Admin :
Put on an index this table. 🤬😠 -
My Favourite song to listen to when I am programming #中國
What's yours' ?
https://youtube.com/watch/...5 -
Index, currIndex and i are all -1.
The real index is a postfix on a string in another class passed through several layers of reflection and delegates.
Tomorrow will be better. Tomorrow will be better. Tommorow will be better.... -
The other day I was debugging an internal app we have which is used to develop screens for an embedded device and noticed a function which enumerated the widgets on a particular screen. One would think this would be a simple task of having a local variable to keep count, assign the widgets a number, index itself, and continue. But no. The previous (and no longer employed) developer for some awful reason, created a TStringList, got the name of the widget, added it to the stringlist, used the result of the add function which returned the index, and used that result to assign widgets their index. All while creating the object and freeing it within the same function. WTF.2
-
ICT class.
Class title: Excel as DB
It was about filters and sorting.
The closest thing to a db was that I found an INDEX function while I was bored... -
Hail Mary pass: writing your web app in one single streak, refresh the index, and get http 500 OK 🙏🙌3
-
How come calm shit like this keeps me awake? And the moment I take my headset off - eyes close shut?
I don't get it...
https://youtube.com/watch/...1 -
Medical Question:
Do you have any tips for dealing with a sore index finger nerve? I've already bought a large mouse so my hand can rest on it but it's been getting worse. 😥3 -
One of my python students just uses his index fingers to type. And he moves his hands from elbows for each key. He said he completed his post graduation. I don't know how he survived these many years. I advised him to learn touch typing though.
-
Made a custom pop up for the web app im building then i encouter a problem when i saw the pop up in safari it doesnt show up properly -_- deym cross platform compatibility the background is not grey and i think safari ignored the z index in my css :(
-
Embedded database is so lack of choice. SQLite, might be best, if you want stability / ACIDity.
Again, SQL means normalize everything, if I've ever want to index it...
Then, ON DELETE CASCADE? TRIGGER? Also, MANY-to-MANY kills.6 -
Do you have a db specialist in teams? I often see frontend & backend ranting but no db Devs. Isn't that role so crucial as one lost index can cause massive performance drops?5
-
Caused by: UcanaccessSQLException: UCAExc:::4.x.x external routine invocation exception: null value not allowed
Hmm.. Who could've thought `where rows_numbered.rownum = grouped.item_index` would ever yield a null...
Sometimes I can be such an idiot6 -
You know, sometimes I've just got a blockade, I'm trying to iterate through a List and if there's a certain character at the current index add all values after that to another List until the special character shows up again.
I've been sitting here for what, 5 hours?
Don't know what's wrong with me today.2 -
When someone truncates several tables and removes their column indices in DEV so my quick two line change testing goes from taking 30 minutes to 3 days while I restore all 200 million rows and re-index all the columns. 🙄
-
200 searchable records (heavily searched and essential to the app) kept getting deleted from their index on our search engine.
we couldnt figure out why, but we wanted to resolve this quickly next time it happens so we got them back up, duplicated the index, and whenever we see they got deleted we resync them from the replica.
Eventually i found that there was a piece of code that updates the index by deleting everything from it and uploading everything back but it was buggy in doing the latter.3 -
Me and a friend are making a discord bot, and added a warning command to warn users.
All was going well, and when we tested the deleting a warning it seemed fine. I then tried to delete all the warnings one by one, when we came across a problem. It wont delete the last warning in the array, the 1st, 2nd, 3rd etc? Thats fine, just the last index that isnt working.
Our code is like this:
list = data.warns//a list of JSON format warnings
console.log(list)//shows the value is in the list
console.log(list[index])//shows the value
delete list[index]
console.log(list)//shows its gone
data.warns = list;
console.log(data.warns)//shows the value is still no longer present
data.save().catch(blah blah)//no error is caught, and nothing crashes, it proceeds to send a message to the channel after this
but then the value at index is still there in the database as if it didn't save it, but only if the index is the last item in the array.
We have been stuck on this for over an hour and I now remember why I hate programming.2 -
So... Three of us have the task to do security reviews for one team... As to who reviews what, we decided on the basic algo of assigning an index to our names and then doing (ticket number) % 3 to get the index and therefore the reviewer for that task... Simple enough, but still you need to modulo the number and remember your index so I created a simple .html file so we can easily see who reviews which ticket by inputting the ticket number... In a hurry I named it whoreview.html
Today, the manager saw it and said to rename it before HR gets involved :D -
Fully upgraded wordpress for my blog (just not interested writing my own ) with security patches and got hacked... all index files in first level directories replaced. Will find the time to make my own and migrate all posts because "wordpress is awesome"6
-
Need advice for buying VR capable PC or laptop.
Basically, I want to start developing VR applications and run VR games through Virtual Desktop or Air link through Oculus Quest 2, which I will buy next month (no, I don’t have money to buy Valve Index and invest in new stationary computer), but I’m not really sure which setup I should buy. I really don’t want to spend more than 800 € for a computer. Can anyone share their experience and computer parts bought or recommended?
Thanks in advance! 😊7 -
I declared it a Heisenbug!
So, basically I was starting multiple threads...
I was getting a list index out of range on line 268 which was a dict. Strange.
36 hours later, a lot of changes, I was still having the same error whatever I put on line 268, log, try, but when I got it on a comment... I lost it.
Restarted Pycharm.
Reset the branch to remote.
Everything worked fine.
Fuuuuuuuuuuu -
Fuck netlogo,
Fuck the way you have to code anything in there, you can't even access an element in a list or string using list[index] but you have to use "item index list".
Netlogo is aimed at kids so it also avoids using math symbols like it's a sin to use them.
You make variables with "let name value" and "set name value".
It's a huge pain whenever I get a assignment which I need to make in netlogo again.
Fuck netlogo.1 -
What is everyones opinions on declaring class constructors as 'final'?
Could use some feedback experience, pros/cons?
I'm building a hobby MVC-like framework inspired by OpenCart, where the default controller method is "index" rather then "__construct"
Keep in mind i'm only writing code towards the latest supported PHP versions, so PHP4 style constructors are not of concern. -
Day of the programmer should be tomorrow, because it should be a zero-based index to the day on position 256
-
Does anyone know the reason behind why JavaScript Arrays start with an index of 0 instead of 1? Or why the .length property starts at 1 instead of 0.11
-
!!rant
Elasticsearch! First time touching it and need to find out on my own how to build an index that allows a weighted multi field fuzzy search on four fields where two needs to be full ngram, one ngram on the words and one standard search + not index any other field. The documentation is horrible! Just realizing that this is what I need took me 2 days!2 -
What's a good book to learn ELK hands-on?
I have an instance set up and working but want to need some more advanced features? like mapping, index templates, querying remotely for aggregations.
The Elastic docs feel very high level and maybe assumes u can read their minds... A lot of snippets I just go "uhm.. where do I put this in the file, which file?"4 -
Duuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuck off you bloody infamous basterds flattening their fat asses at Microsoft.
I wasted half of my dev day to configure my wcf rest-api to return an enumeration property as string instead of enum index as integer.
There is actually no out-of-the-box attribute option to trigger the unholy built-in json serializer to shit out the currently set enum value as a pile of characters clenched together into a string.
I could vomit of pure happiness.
And yes.
I know about that StringEnumConverter that can be used in the JsonConvert Attribute.
Problem is, that this shit isn't triggered, no matter what I do, since the package from Newtonsoft isn't used by my wcf service as a standard serializer.
And there is no simple and stable way to replace the standard json serializer.
Christ, almighty!
:/ -
Anyone else got numb/tingling feeling in your index and pinky finger?
It was fine during my holiday, came back and this again just after 2 days behind the desk...10 -
I ngl miss the thrill of high-performance computing. Or more precise would be where the program's running was directly affected by what I did.
Ever since career took the applications/apps/backend route, i try to optimise but ik it's useless.
The c#/.net would anyway make its own changes, Im not allowed to write direct SQL queries and index-powered joins coz "EF will handle it". Any JS/TS is recreated by Node
Thats how work be but kinda saddening2 -
Damn you nginx...
Let's say you have a simple location directive like:
location / {
auth_reques /auth;
index index.html;
}
location = /auth {
internal;
proxy_pass <...>;
}
Now guess how often nginx makes a subrequest to /auth.
Thats correct TWO times... "why?" you ask?
Well isn't it obvious that nginx hits the auth request, then rewrites the request to the index file, hits the auth request again because it's technically a different request now and then proceeds to hand out the file?
Thanks for documenting this. NOT6 -
public function index(Request $request): array
{
$parameters = json_decode($request->get('lazyEvent'), true);
if (isset($parameters['page'])) {
$page = $parameters['page'];
} else {
$page = 0;
}
$queryBuilder = DB::table('companies')
->leftJoin('company_contact', 'company_contact.company_id', '=', 'companies.id')
->groupBy('companies.id')
;
if (isset($parameters['filters']['name'])) {
$queryBuilder
->where('name', 'like', '%' . $parameters['filters']['name']['value'] . '%')
;
}
$total = $queryBuilder
->count()
;
$companies = $queryBuilder
->select('companies.id', 'name', 'email', 'phone', DB::raw("COUNT('company_contact.id') AS contact_count"))
->orderBy('name')
->offset($page * $parameters['rows'])
->limit($parameters['rows'])
->get();
return ['companies' => $companies, 'totalRecords' => $total];
}
what is this shit? I get $total 1 when in reality is $companies count is 51
I am thinking avout writing whole sql as raw because I cannto get fucking count correctly21 -
Team lead gave me a task, fix a script he made to update 28k+ lines that wasn't working (he was busy with other stuff)
So I fixed and tested it in our dev environment, which had about 10 lines to use as test
Worked well, but a single select getting 1 column in a table is taking more than 40 secs, I need this select to run for every line (I tried making it get all data at once but it was getting duplicated entries)
The damn table doesn't have index, I think this will be the longest script I've ever made 😅😅😅 -
Rant
Okay so I was given a task to add an additional column to the reports in our timesheet system a couple of days ago.
This system hasn't been modified in several years and was not written especially well.
The report generated is shown in a Windows forms datagrid.
I spent 2 fucking hours trying to figure out how data was getting added to this shitting thing when I realised that it was being done by shitting index on the SELECT statement.
God, why didn't the original Witter just use a bloody databinding -
String[] hidingPlaces = new String[1000000];
hidingPlaces[Math.rand()*1000000] = "bug";
findBug(hidingPlaces);
public int findBug(String [] are) {
// todo: return index of bug with complexity < O(1)
} -
tabs spaces oses languages what about using I instead of counter or index as a variable for for loop2
-
hoi guys,
on freecodecamp i had a lesson to build a website on codepen.io with bootstrap.
except that it has some code features, it felt like normal coding.
i have to write all on my own also.
And then I opened a html5 project on netbeans with downloaded bootstrap and it filled the index. html plus css and other files with much content (but looked like shit)..
why is there such a big difference between codepen bootstrap and netbeans bootstrap?6 -
(%{DATE})(.*)(Sent)( ID)(\[)(?<index>(.*))(])( /)(?<m>(?!m0)(?!m1)(m.*))(/)(?<t>(t.*))(/)(?<p>(p.*))(/)(?<r>(r.*))(/S\[)(?<s>(.*))(]/R\[)(?<r>(.*))(])
Heyyyy I am not a grok robot!!!6 -
I don't know why I can't understand how to use thymeleaf. It's concept makes sense, split an html page into two so you have a header html page made up of code you don't want to change, and an index html page of content you do want to edit. But no matter what it won't fucking connect the classes.
https://stackoverflow.com/questions...
If anyone has experience with this you can take a look at my post here on it, maybe give some input. For now though I'm going to just run a single html file and make comments in my index page. :/5 -
git cherry-pick -n <commit>
The "-n" is alias for "--no-commit" and it applies the content of the target commit into your working directory without making any commit. Usefull if you want to cherry-pick many commits, tweak them and make a new one or simply want to grab some functionality into your index.
What's yours well-appreciated but not-that-well-known git functionality?3 -
let's say i want to host my own local search engine, i have the application ready.
now i want to activate my crawlers to scrap and index the web.
would i be in hot water for doing this? is there any implementation level rule that i can check other than robots.txt?
any thoughts or inputs on the subject other than it being a huge waste of time and resources :D.2 -
Decide to move to docker for windows from toolbox. Worked well until vpn/s-tunnel all crapped out.
Found out about hyperv, default ethernet, HNS, windows DNS etc etc getting confused.
Removed docker and hyper v, back to working again.
Interface index for adapter selection , really ? -
Me: removed appsettings.development.json from git index, because every time we pull, we have to correct the files of 8 api's, just to be able to build that ducktape solution
Other devs: we can't build anymore, our appsettings.development.json are gone!!!!!
Manager: (total silence on my 'good morning') you broke our application!!!!
Me: checks 8 appsettings.development.json in
Almost everybody HAPPY3 -
Currently working on a snippet manager application in my free time.
Added support for c++,c and codffe script. Added them to my supported languages array to use them inside the editor.
Just to realize that now all my test snippets i created for testing are using the wrong language for the internal code editor.
Well Fuck me! Deleting all snippet files now and changing the system to be indipendent of the array index. -
README.md, is there any way in bitbucket/stash to customize the index markdown to be rendered other than README.md?2
-
Why is it a big deal that arrays start att zero and the length att One? It's logical... Arrays as an index in memory and length as the... Length of the array (numbers of possible objects in the array)4
-
Algolia says:
"So our price widget doesn't allow decimals, you'll have to create a custom widget"
I do it.
"Hey, It's not working and I verified it's applying the filter correctly. I noticed my price is a string in your index, maybe that's incorrect and causing it to not work?"
They say: "Yep, you'll need to run an update to fix that and change all to floats" (charges an arm and a leg for the thousands of index operations needed to update the data type)
I clear the index and send a single one as a test, verifying it's a float by casting it using (float) then var_dumping. It shows "double(3.99)", but when it gets to Algolia, it's 0.
So I contact support.
"Hi, I'm sending across floats like you say but it's receiving it as 0, am I doing something wrong? Here's my code and the result of the var_dump"
They respond: "Looks like you're doing it right, but our log shows us receiving 3.999399593939, maybe check your PHP.ini for "serialize_precision" and make sure it's set to -1"
I check and it's fine, then I realize that var_dump is probably rounding to 2 decimal points so I change my cast to (float) number_format($row['Price'], 2) and wallah...it works.
Now I've wasted days of paying for their service, a ton of charges for indexing operations, and it was such a simple fix.
if they had thrown an error for the infinite decimal, that would have helped, but instead I had to reach out to find out that was the issue.
#Frustrated. -
Does Google Crawl every website and pages on the internet?
I want to know does google crawler will visit my pages or they only visit few, like I have more than 10 Million pages so how much time it will take approx to index complete pages.4 -
How broken is z-index implementation on Chrome?!
Almost an hour lost today, due to perfectly fine web code running on Firefox, but showing completely wrong z-order on Chrome.
The reason? I manually changed the z-index of a child and not the one from the parent DIV. (and I was only making the child z-order *higher* than everything else on screen, so I could drag it around)
Code now has a bunch of "// thanks Chrome!" to show due appreciation. Grrr....1 -
So I’ve been recording the same project into dr who bullshit meets the invasion of the body snatchers
If I were sleeping and motivated to finish something some bastardized people would steal it would be so simple to keep progressing through it and it would be contributed allowing people to write their implementations to parse and index Gis formats and integrate a lot of valuable data regarding travel and survivable conditions
Except for all the above mentioned bs which cuts my goddamn motivation down to next to nothing
And no one else seems to see a problem with this across the goddamn board because the pods already sucker their innards out13 -
Question for someone who uses Mongo Atlas Search:
If I'm only interested in autocomplete from the start of the text, which is more performant?
1) standard analyzer + edgeGram tokenizer
2) keyword analyzer + edgeGram tokenizer
I don't see why I should index separate words if I don't care about random positions :/
Thank you6 -
Any one has recommendations of online mark down tool? Such a pain in the ass to create dev doc in google doc, especially when you trying to add the number index in the front.1
-
So, today I was helping my cousin with his math homework, then I realized he had found the equation for a sequence of numbers taking the first index as 0 ... I never been so proud in my life.
It was wrong tho :(rant tagz tagy linux index zero rules math tagx more popular stuff pichardo for president javascript2 -
I don't know much about how search engines works and all that stuffs. I started a Blogspot and tried the Google Console to index my web on Google. But it sucks. I get redirect errors. "Crawled- but not indexed.", "Discovered not crawled". I don't know shit. And every video is just a crap on YouTube. I tried several methods and sometimes I feel like giving up.6
-
Something interesting i learned today about the html5 video tag is that even if preload is set it's up to the player the render engine is using to fetch the index of the file first as with mp4 this is usually at the end of the file.
This means that for Blink and Gecko most likely fetch this first themselves. But for webkit it opens in quicktime on mobile devices which you cannot pass parameters to and flat out waits for the entire stream to start playing.1 -
A usefull function, everyone should have near by. May requires some optimisations.
/// <summary>
/// DoEs tHiS To tHe pRoViDeD StRiNg. StArTs aLwAyS WiTh a cApItAl
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
public static string DoThIsToThEtExT(string s)
{
var array = s.ToCharArray();
Parallel.For(0, s.Length, (index) =>
{
if (index % 2 == 0)
{
array[index] = array[index].ToString().ToUpper()[0];
}
else
{
array[index] = array[index].ToString().ToLower()[0];
}
});
return new string(array);
}3 -
I've over 17GB of data, downloaded a website, al of the content is .txt and .html.
I want to search inside all of these files.
What is the best tool to do that? any command or some software which can index so it'll be fast?17 -
I want to keep 1 year of daily indexes but for the ones older than 30 days, unloaded from memory. But accessible when needed.
So like say there's a performance issue today and I want to compare all the activity against 2 months ago. I can open the old index and search it.
Can you do that, does closing remove it from memory? Otherwise how would you do that?6 -
can you use elastic search as a search engine for your app ?
because i see several weak points in it.
the increased latency after every bulk uploading of docs, meaning u cant ensure fast response time for users
the inability to add synonyms without closing the index ? this is either downtime or ill have to replicate an index to update the original and then switch back to it !!
idk i feel i either must have wrong info or elastic is very inefficient. I might be wrong, not too experienced with it so if I am let me know of some good resources and workarounds that helped you3 -
Is there a site for design/ui/ux inspiration and ideas, like an index for ways to do things, cards, tags, selectors, etc?5
-
How do you measure happiness?
Brilliant video and amazing comment section.
https://youtu.be/6Pm0Mn0-jYU7 -
Why does it matter if I scroll my mouse with my middle finger?
You keep using your index finger while I stick with my middle finger.4 -
I've had an issue with eel.js for the last two days , the shit has been giving me nightmares all weekend backend processes keep shutting down on page navigation turns out i had not imported eel on the index page.
For fucks sake it had to be that one single line of code -
Hmm... API and how to use it:
The Average Price Index gives you an idea how much raise you need just to keep your current purchase power. -
What would be the easiest way to make line 16 work.
I don't know if there is a simple way to tell this "if" argument to check all af the "Remote Host" classes for a matching string at that index.
I'm trying to design with modularity in mind.14 -
When is it a good idea to use linked lists?
In my pet project, I want to have a list of items with an index. The index of an item should be updateable, and the index of the other items should adjust.
A linked list would make it very easy to adjust the order since you just need to update the "next" node of 2 items, but I think this would make getting the index of items more troublesome.
What is the preferred way to do something like this, am I just overthinking it, and would updating all the indices of the items not be such a big job?
The project uses React and mongo (express-mongoose) btw, if that's important.4 -
n=input( )
k=list(n)
for j in range(len(k)):
if k[j]=="a":
k.pop(j)
print(k)
''' i want to print the list by removing a letter "a" but it is showing index error why ? help me out'''7 -
I did some of the front-end and whole backend. build and manage the SQL + elasticsearch database. After all of this, only 17 lines of mother fu**er code ruined my life. The client is asking for code. And.... And... Can't say anymore.
input {
file {
path => "/home/rsa-key-20200528 /aslogger.log"
type => "java"
start_position => "beginning"
}
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
hosts => ["localhost:9200"]
index => "aslogger"
}
} -
Gotta love git. Every time I look for something I don't know I learn about some new fun command like
git update-index --really-refresh
And yes, there's a regular refresh command as well :)