Thread has been deleted
Last comment
a bit of code
Tense | 
Poland Biggest_Bigg_Fan 
imgur.com/a/osqidlp need fix for this as im completely lost to the people who come here to ask about calculus, yes I passed barely but hltv mens)) didn't help
2022-01-25 20:50
Topics are hidden when running Sport mode.
bump unfortunately i cant help you
2022-01-25 20:50
3 replies
Me neither, so what do we 2 do?
2022-01-25 20:51
2 replies
#5
Petra | 
Poland 138|
sextinng
2022-01-25 20:52
1 reply
+1
2022-01-25 20:53
#2
 | 
Canada MiLkBaGzz
2022-01-25 20:51
1 reply
#4
 | 
Canada MiLkBaGzz
gl bro
2022-01-25 20:51
#6
 | 
Seychelles czajalelz
ask it on stackoverflow lol
2022-01-25 20:53
12 replies
they'll ban my post for asking about homework
2022-01-25 20:53
11 replies
Homework questions are allowed on SO, but questions that don't show any effort are not. I'd personally vote to close it and when it's closed, I'd vote to delete it. Also lol at programmer wannabes who don't want to do anything on their own and expect others to do it in full and for free. Good luck passing that course with this attitude lol.
2022-01-25 21:00
10 replies
I posted once showing some effort actually and still I've got only downvotes and later a deleted post
2022-01-25 20:58
8 replies
link it
2022-01-25 20:58
7 replies
6 replies
I removed it because I saw no point in keeping it as I received negative feedback only
2022-01-25 21:01
4 replies
always explain what you tried and narrow down your problem before asking for help, it will be a valuable skill if you want to be a software engineer thank God I am a DJ making 32k/month
2022-01-25 21:02
1 reply
+1 fucking moron :D paste whole exercise and counts that other will solve it, i doubt he even try to solve it on his own
2022-01-26 19:25
Come on, you only got one (completely justified) downvote. "I would like to know what i do incorectly" is not a sufficient description of the problem, you need to be more specific. People actually asked you what was the problem with that code and you didn't respond. I'm very active on SO, and I've seen thousands of crappy questions, but yours was salvageable.
2022-01-25 21:18
1 reply
I was a bit confused and found a solution by myself finally without having to describe what the problem was, anyways when I saw homework questions FAQ pop up I gave up on my thread
2022-01-25 21:09
Well you did not describe the problem (no error message, or the output you expected vs the output that you actually get). That question lacks details and deserved to be closed, but it actually wasn't closed and you deleted it yourself. *shrug*
2022-01-25 21:04
+1 I don't mind helping with homework when I see that at least the person tried
2022-01-25 20:58
do you want to do it right, or use a workaround? you can just convert the number to binary string, tokenize it and convert the binary string back to int (workaround) or you can just use bit arithmetic that is not so hard when you get the gist of it
2022-01-25 20:55
5 replies
#26
 | 
Australia thisba!tes
name doesn't checks out
2022-01-25 21:13
ok so I found out how to convert the number to a binary string and tokenize it but idk how to pack 6 numbers into period
2022-01-25 21:16
3 replies
man, don't do what I said, it is wrong in so many levels haha just do basic bit manipulation, it's not that hard, you can handle calculus but not high school math?
2022-01-25 21:18
2 replies
when you don't attend classes due to work it really isn't that simple mate
2022-01-25 21:20
1 reply
stackoverflow.com/questions/14145733/how.. you just have to change that to read more than 1 bit at a time
2022-01-25 21:21
#14
 | 
Austria Ostmark
you need to multiply by 2^n to get them at the right spot
2022-01-25 20:58
404 incoming
2022-01-25 21:00
it's as simple as 123 but i wont help you because youre a lazy ass mf.
2022-01-25 21:01
1 reply
+1
2022-01-25 21:13
Have you been introduced to the binary number system? If not, why would they give you a coding task without introducing you to some basics first...
2022-01-25 21:01
#22
 | 
Canada Unravel
I can help if you send 5 sand dunes
2022-01-25 21:06
dude cmon, there's a solution inside the condition, just do what they told you to do and you good
2022-01-25 21:07
You can output this numbers like binaries and than concatenate as a string. Example y=2003,m=10,d=31 binY=0000011,binM=1010,d=11111 like binaries now we can concatenate them binDate=0000011101011111, now you can do this operation with another date and add this to the end of firstdate in binaey format. To get data backwards you need to split this number as substrings int year=bothdates.substring(0,6) use function which make substring as integer
2022-01-25 21:19
6 replies
You need to make this binary number as integer as condition says, and make it binary again to take substrings
2022-01-25 21:21
#29 kkkkkkk
2022-01-25 21:22
This is a simple exercise that's intended to be solved using bitwise operations. I doubt any other solution (e.g. involving string methods) will even be accepted.
2022-01-25 21:33
2 replies
Maybe bit shifting Will be much easier and better
2022-01-25 21:35
1 reply
it will be, and it's such a basic task (maybe the OP hasn't learned about bitwise operators but i doubt because otherwise such task wouldn't have been given to him) He basically has to shift and then add up the shifted values to bitpack it and then to recover he literally does the opposite, super simple.
2022-01-25 21:59
Integer in binary form is sum of numbers 1 and zero which are powered by position of this number like (1 or 0)*2^(n)+ (1 or 0) * 2^(n-1) +... + 1 or 0*2^0 For example 3=1*2^1+1*2^0=2+1 so we can write this number as 11 Number 4 Will be 1*2^2+0*2^1+0*2^0 so it Will be 100, yoy can add as many zeros in front as you want it Will be same number 100=0100=00100 and etc
2022-01-25 21:34
Integer.toBinaryString() and pad zeros to the left to fill the numbers of bits that are given in the format
2022-01-25 21:24
Are you familiar with bitwise operators like AND, OR, left, right shift?
2022-01-25 21:30
#40
 | 
Other i_r8_ur_b8
-java i sleep
2022-01-25 21:35
try this : String periods=""; periods = Integer.toBinaryString(fromy) + Integer.toBinaryString(fromm) + Integer.toBinaryString(fromd) + Integer.toBinaryString(toy) + Integer.toBinaryString(tom) + Integer.toBinaryString(tod) ; periods = Integer.parseInt(periods, 2); ... then to repack: temp = Integer.toBinaryString(periods); fromy = Integer.parseInt(temp[0:6]); fromm = Integer.parseInt(temp[7:10]); fromd = Integer.parseInt(temp[11:15]).... and so on... OBS: i know it is wrong. i hate java. you can figure out the rest easy from here.. gl PS: do this too #35
2022-01-25 21:43
3 replies
: is an invalid assignment operator, I don't think it should be done like this
2022-01-25 22:20
2 replies
read my last message dude, im trying to help u do it properly...
2022-01-25 22:22
1 reply
nice "your teachers most likely want you to use bitwise to do this" makes sense.
2022-01-26 19:09
don't use Integer.toBinaryString, your teachers most likely want you to use bitwise to do this, and it is very simple, all you need to do is use the right, left shift, AND, OR bitwise operators for example the first year can be bitpacked by shifting left 25 bits and then recovered by shifting right 25 bits and then AND'ing it with 0x7F(127) Do you get the idea now or do u need any more help?
2022-01-25 21:48
5 replies
nah idk how to bitpack and shift bits
2022-01-25 22:32
4 replies
Assume that y1, m1, d1 is the from date and y2, m2, d2 is the to date then we can bitpack it by: int packed = (y1 << 25) | (m1 << 21) | (d1 << 16) | (y2 << 9) | (m2 << 5) | d2; '|' is the same as '+' in this case and then to recover each day, month we can shift right and then AND (&) it for example: int y1Recovered = packed >> 25 & 0x7F; Do you know how to do the rest now? Edit: just realized i can't post more than 5 messages per day.. so i guess i'll just keep editing this message to help u further if needed... Edit 2: your current approach is close but the AND's(&) are wrong, you're using 0x7F which is 127(7 bits) for all of them, but only year is bitpacked using 7 bits, you also forgot 'to month'
2022-01-25 22:54
3 replies
int period = 0; int packed = (fromy << 25) | (fromm << 21) | (fromd << 16) | (toy << 9) | (tom << 5) | tod; fromy = fromm = fromd = toy = tom = tod = 0; int fromyRecovered = packed >> 25 & 0x7F; int frommRecovered = packed >> 21 & 0x7F; int fromdRecovered = packed >> 16 & 0x7F; int toyRecovered = packed >> 9 & 0x7F; int todRecovered = packed >> 0 & 0x7F; like this?
2022-01-25 22:51
try PM'ing me in my profile
2022-01-25 22:52
public class DatesSimple { public static void main (String[] args) { int fromy = 2000, fromm = 2, fromd = 3; int toy = 2127, tom = 11, tod = 29; System.out.println("**** Original\n" + "From " + fromy + "/" + fromm + "/" + fromd + " to " + toy + "/" + tom + "/" + tod); int period = 0; int packed = (fromy << 25) | (fromm << 21) | (fromd << 16) | (toy << 9) | (tom << 5) | tod; fromy = fromm = fromd = toy = tom = tod = 0; int fromyRecovered = packed >> 25 & 0x7F; int frommRecovered = packed >> 21 & 0x9; int fromdRecovered = packed >> 16 & 0x1A; int toyRecovered = packed >> 9 & 0x7F; int tomRecovered = packed >> 5 & 0x9 int todRecovered = packed >> 0 & 0x1A; // ... (unpack 6 numbers from'period') System.out.println("**** Reconstructed\n" +"From " + fromy + "/" +fromm + "/" + fromd + " to " +toy + "/" + tom + "/" + tod);}}
2022-01-25 23:01
sorry i dont speak java
2022-01-25 22:54
sorry i dont speak robot
2022-01-26 19:11
Interesting problem, not sure the point of it but ok. I assume this is what you are looking for baeldung.com/java-bitmasking
2022-01-26 19:21
you lazy ass, get your shit done by yourself.
2022-01-26 19:37
#58
 | 
Finland smirk_cat
i help for money =)
2022-01-26 20:41
Login or register to add your comment to the discussion.
Now playing
Thumbnail for stream
Brazil
Apoka
7668 viewers
Top streams
All(51)
Casters(28)
Streamers(11)
Organizers(12)
Brazil
Apoka
(7668)
France
kennyS
(6517)
United Kingdom
ESL TV
(4076)
Other
Champion of Champions
(3841)
Other
WePlay
(2636)
Netherlands
D0cC
(1996)
Other
ohnePixel
(1989)
Other
FURIOUSSS
(1825)
United States
fl0m
(1695)
Poland
Snax
(1542)
Russia
Maincast
(1398)
Other
Anomaly
(1301)
Brazil
GODSENT
(1205)
Portugal
RTP Arena Main
(1181)
Russia
sL4M
(921)
Russia
Champion of Champions
(883)
Russia
magixx
(876)
Ukraine
WePlay
(603)
Czech Republic
PLAYzoneTV
(599)
Germany
99Damage
(501)
Other
Teleperformance
(481)
Norway
jkaem
(389)
Portugal
mucha
(334)
Russia
Dima
(323)
Spain
the real fer
(316)
Denmark
Dust2 TV
(287)
Serbia
4glory
(229)
Russia
zoneR
(195)
Romania
Digital Crusade
(193)
Poland
GoodGame
(160)
Spain
DreamHack
(158)
Bulgaria
A1 Gaming League
(143)
Slovakia
Y-Zone
(136)
Brazil
cutzmeretz
(119)
Ukraine
1mpala
(102)
Brazil
JokerBR
(74)
Portugal
RTP Arena
(72)
Ukraine
WePlay (YouTube)
(67)
Hungary
Esport1 TV
(57)
Brazil
LorranBs
(52)
Russia
FinigaN
(48)
Russia
watchfulTV
(40)
Other
WePlay (YouTube)
(23)
Serbia
ArenaEsport
(20)
Germany
Fragster
(12)
Serbia
A1 Adria League (YouTube)
(10)
United Kingdom
BARDOLPH
(8)
United States
Dugaid
(7)
Serbia
Kuvo TV
(4)
Czech Republic
fredi
(2)
Bulgaria
qnchosad
(1)